From db2b3569422c934ff0603b071447d0a8da8c2bf4 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 13 Sep 2024 20:47:41 +0300 Subject: [PATCH] Remove stop for o1 --- public/scripts/openai.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/public/scripts/openai.js b/public/scripts/openai.js index 5455637e4..246766a46 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -1982,9 +1982,9 @@ async function sendOpenAIRequest(type, messages, signal) { delete generate_data.presence_penalty; delete generate_data.tools; delete generate_data.tool_choice; + delete generate_data.stop; // IDK if it supports it and I have no way to test it // delete generate_data.logit_bias; - // delete generate_data.stop; } await eventSource.emit(event_types.CHAT_COMPLETION_SETTINGS_READY, generate_data); @@ -2134,7 +2134,6 @@ async function checkFunctionToolCalls(data) { const args = toolCall.function; console.log('Function tool call:', toolCall); await eventSource.emit(event_types.LLM_FUNCTION_TOOL_CALL, args); - data.allowEmptyResponse = true; } } @@ -2148,7 +2147,6 @@ async function checkFunctionToolCalls(data) { /** @type {FunctionToolCall} */ const args = { name: content.name, arguments: JSON.stringify(content.input) }; await eventSource.emit(event_types.LLM_FUNCTION_TOOL_CALL, args); - data.allowEmptyResponse = true; } } } @@ -2163,7 +2161,6 @@ async function checkFunctionToolCalls(data) { const args = { name: toolCall.name, arguments: JSON.stringify(toolCall.parameters) }; console.log('Function tool call:', toolCall); await eventSource.emit(event_types.LLM_FUNCTION_TOOL_CALL, args); - data.allowEmptyResponse = true; } } }