diff --git a/src/public/app/widgets/llm_chat/communication.ts b/src/public/app/widgets/llm_chat/communication.ts index 70aed2ac5..bb58a47b2 100644 --- a/src/public/app/widgets/llm_chat/communication.ts +++ b/src/public/app/widgets/llm_chat/communication.ts @@ -94,7 +94,8 @@ export async function setupStreamingResponse( try { const streamResponse = await server.post(`llm/chat/${chatNoteId}/messages/stream`, { content: messageParams.content, - includeContext: messageParams.useAdvancedContext, + useAdvancedContext: messageParams.useAdvancedContext, + showThinking: messageParams.showThinking, options: { temperature: 0.7, maxTokens: 2000 diff --git a/src/services/llm/chat/rest_chat_service.ts b/src/services/llm/chat/rest_chat_service.ts index 3abce813d..0a400ad91 100644 --- a/src/services/llm/chat/rest_chat_service.ts +++ b/src/services/llm/chat/rest_chat_service.ts @@ -294,7 +294,7 @@ class RestChatService { role: msg.role as 'user' | 'assistant' | 'system', content: msg.content })), - query: content, + query: content || '', // Ensure query is always a string, even if content is null/undefined noteId: session.noteContext ?? undefined, showThinking: showThinking, options: pipelineOptions,