fix o1 streaming in the other place too
This commit is contained in:
parent
bfa2d65328
commit
8c72887b2c
2 changed files with 8 additions and 3 deletions
|
|
@ -167,9 +167,9 @@ describe("LLM", () => {
|
|||
new OpenAI({ apiKey: process.env.OPENAI_API_KEY, model: "o1-preview" }),
|
||||
{ skip: false },
|
||||
);
|
||||
// testLLM(new OpenAI({ apiKey: process.env.OPENAI_API_KEY, model: "o1" }), {
|
||||
// skip: false,
|
||||
// });
|
||||
testLLM(new OpenAI({ apiKey: process.env.OPENAI_API_KEY, model: "o1" }), {
|
||||
skip: false,
|
||||
});
|
||||
testLLM(
|
||||
new Gemini({
|
||||
model: "gemini-2.0-flash-exp",
|
||||
|
|
|
|||
|
|
@ -245,6 +245,11 @@ class OpenAI extends BaseLLM {
|
|||
body.messages = formatMessageForO1(body.messages);
|
||||
}
|
||||
|
||||
if (body.model === "o1") {
|
||||
// o1 doesn't support streaming
|
||||
body.stream = false;
|
||||
}
|
||||
|
||||
if (body.prediction && this.supportsPrediction(body.model)) {
|
||||
if (body.presence_penalty) {
|
||||
// prediction doesn't support > 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue