Skip to content

Commit

Permalink
use stream when request o1
Browse files Browse the repository at this point in the history
  • Loading branch information
code-october committed Nov 21, 2024
1 parent 23350c8 commit ef24d3e
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 @@ -224,7 +224,7 @@ export class ChatGPTApi implements LLMApi {
// O1 not support image, tools (plugin in ChatGPTNextWeb) and system, stream, logprobs, temperature, top_p, n, presence_penalty, frequency_penalty yet.
requestPayload = {
messages,
stream: !isO1 ? options.config.stream : false,
stream: options.config.stream,
model: modelConfig.model,
temperature: !isO1 ? modelConfig.temperature : 1,
presence_penalty: !isO1 ? modelConfig.presence_penalty : 0,
Expand All @@ -247,7 +247,7 @@ export class ChatGPTApi implements LLMApi {

console.log("[Request] openai payload: ", requestPayload);

const shouldStream = !isDalle3 && !!options.config.stream && !isO1;
const shouldStream = !isDalle3 && !!options.config.stream;
const controller = new AbortController();
options.onController?.(controller);

Expand Down

0 comments on commit ef24d3e

Please sign in to comment.