populate models properly

This commit is contained in:
LE Quoc Dat 2025-04-24 01:38:17 +01:00
parent 008c96b153
commit 7ff3ed9193
1 changed files with 2 additions and 2 deletions

View File

@ -579,7 +579,7 @@ export default function ThreadPage({ params }: { params: Promise<ThreadParams> }
};
}, [threadId]);
const handleSubmitMessage = useCallback(async (message: string) => {
const handleSubmitMessage = useCallback(async (message: string, options?: { model_name?: string; enable_thinking?: boolean }) => {
if (!message.trim()) return;
setIsSending(true);
@ -601,7 +601,7 @@ export default function ThreadPage({ params }: { params: Promise<ThreadParams> }
try {
const results = await Promise.allSettled([
addUserMessage(threadId, message),
startAgent(threadId)
startAgent(threadId, options)
]);
if (results[0].status === 'rejected') {