mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-11 22:51:26 +00:00
feat(fireworks): add GLM-5 model and fix fireworks tests
This commit is contained in:
parent
a511ac0eb5
commit
9f86deb441
1 changed files with 0 additions and 72 deletions
|
|
@ -611,78 +611,6 @@ describe("FireworksHandler", () => {
|
|||
chunks.push(chunk)
|
||||
}
|
||||
|
||||
expect(chunks[0]).toEqual({ type: "text", text: "Hello" })
|
||||
expect(chunks[1]).toEqual({ type: "text", text: " world" })
|
||||
expect(chunks[2]).toMatchObject({ type: "usage", inputTokens: 5, outputTokens: 10 })
|
||||
})
|
||||
})
|
||||
],
|
||||
usage: {
|
||||
prompt_tokens: 5,
|
||||
completion_tokens: 10,
|
||||
total_tokens: 15,
|
||||
},
|
||||
}
|
||||
},
|
||||
}))
|
||||
|
||||
const systemPrompt = "You are a helpful assistant."
|
||||
const messages: Anthropic.Messages.MessageParam[] = [{ role: "user", content: "Hi" }]
|
||||
|
||||
const stream = handler.createMessage(systemPrompt, messages)
|
||||
const chunks = []
|
||||
for await (const chunk of stream) {
|
||||
chunks.push(chunk)
|
||||
}
|
||||
|
||||
expect(chunks[0]).toEqual({ type: "text", text: "Hello" })
|
||||
expect(chunks[1]).toEqual({ type: "text", text: " world" })
|
||||
expect(chunks[2]).toMatchObject({ type: "usage", inputTokens: 5, outputTokens: 10 })
|
||||
})
|
||||
})
|
||||
],
|
||||
usage: {
|
||||
prompt_tokens: 5,
|
||||
completion_tokens: 10,
|
||||
total_tokens: 15,
|
||||
},
|
||||
}
|
||||
},
|
||||
}))
|
||||
|
||||
const systemPrompt = "You are a helpful assistant."
|
||||
const messages: Anthropic.Messages.MessageParam[] = [{ role: "user", content: "Hi" }]
|
||||
|
||||
const stream = handler.createMessage(systemPrompt, messages)
|
||||
const chunks = []
|
||||
for await (const chunk of stream) {
|
||||
chunks.push(chunk)
|
||||
}
|
||||
|
||||
expect(chunks[0]).toEqual({ type: "text", text: "Hello" })
|
||||
expect(chunks[1]).toEqual({ type: "text", text: " world" })
|
||||
expect(chunks[2]).toMatchObject({ type: "usage", inputTokens: 5, outputTokens: 10 })
|
||||
})
|
||||
})
|
||||
],
|
||||
usage: {
|
||||
prompt_tokens: 5,
|
||||
completion_tokens: 10,
|
||||
total_tokens: 15,
|
||||
},
|
||||
}
|
||||
},
|
||||
}))
|
||||
|
||||
const systemPrompt = "You are a helpful assistant."
|
||||
const messages: Anthropic.Messages.MessageParam[] = [{ role: "user", content: "Hi" }]
|
||||
|
||||
const stream = handler.createMessage(systemPrompt, messages)
|
||||
const chunks = []
|
||||
for await (const chunk of stream) {
|
||||
chunks.push(chunk)
|
||||
}
|
||||
|
||||
expect(chunks[0]).toEqual({ type: "text", text: "Hello" })
|
||||
expect(chunks[1]).toEqual({ type: "text", text: " world" })
|
||||
expect(chunks[2]).toMatchObject({ type: "usage", inputTokens: 5, outputTokens: 10 })
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue