From 03fa580a558374c80485b6b36f9b1aad810f2df4 Mon Sep 17 00:00:00 2001 From: skymkmk Date: Fri, 13 Sep 2024 16:25:04 +0800 Subject: [PATCH] fix: give o1 some time to think twice --- app/client/platforms/openai.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index bff34fdf8..492278a9b 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -182,7 +182,7 @@ export class ChatGPTApi implements LLMApi { const content = visionModel ? await preProcessImageContent(v.content) : getMessageTextContent(v); - if(!(isO1 && v.role === "system")) + if (!(isO1 && v.role === "system")) messages.push({ role: v.role, content }); } @@ -316,7 +316,7 @@ export class ChatGPTApi implements LLMApi { // make a fetch request const requestTimeoutId = setTimeout( () => controller.abort(), - isDalle3 ? REQUEST_TIMEOUT_MS * 2 : REQUEST_TIMEOUT_MS, // dalle3 using b64_json is slow. + isDalle3 || isO1 ? REQUEST_TIMEOUT_MS * 2 : REQUEST_TIMEOUT_MS, // dalle3 using b64_json is slow. ); const res = await fetch(chatPath, chatPayload);