From c1ea9e376a58281b180f67471e0beb2edb5b71f8 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Wed, 16 Apr 2025 22:56:47 +0000 Subject: [PATCH] I think sessions are finally decoupled --- src/public/app/widgets/llm_chat/communication.ts | 3 ++- src/services/llm/chat/rest_chat_service.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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,