Skip to content

Commit

Permalink
fix: give o1 some time to think twice
Browse files Browse the repository at this point in the history
  • Loading branch information
skymkmk committed Sep 13, 2024
1 parent d0dce65 commit 03fa580
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/client/platforms/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 03fa580

Please sign in to comment.