Skip to content

Commit

Permalink
💄 style: support o1 models using streaming (lobehub#4732)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Nov 19, 2024
1 parent 415d772 commit 7e9e71a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/libs/agent-runtime/github/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const LobeGithubAI = LobeOpenAICompatibleFactory({
const { model } = payload;

if (o1Models.has(model)) {
return pruneO1Payload(payload) as any;
return { ...pruneO1Payload(payload), stream: false } as any;
}

return { ...payload, stream: payload.stream ?? true };
Expand Down
1 change: 0 additions & 1 deletion src/libs/agent-runtime/openai/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const pruneO1Payload = (payload: ChatStreamPayload) => ({
role: message.role === 'system' ? 'user' : message.role,
})),
presence_penalty: 0,
stream: false,
temperature: 1,
top_p: 1,
});
Expand Down

0 comments on commit 7e9e71a

Please sign in to comment.