From f27a83ef73fe9641cc45e2759f286bcc03c5328c Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 29 May 2024 01:11:40 +0300 Subject: [PATCH] Restrict function calling to non-streaming only --- public/scripts/openai.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index f8ac5a946..1f9dd4c38 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -1853,7 +1853,7 @@ async function sendOpenAIRequest(type, messages, signal) { await eventSource.emit(event_types.CHAT_COMPLETION_SETTINGS_READY, generate_data); - if (isFunctionCallingSupported()) { + if (isFunctionCallingSupported() && !stream) { await registerFunctionTools(type, generate_data); }