Fix codestral
This commit is contained in:
parent
2eeb60ffb3
commit
3e85ea05e9
1 changed files with 4 additions and 2 deletions
|
|
@ -263,7 +263,9 @@ class VertexAI extends BaseLLM {
|
|||
});
|
||||
|
||||
for await (const chunk of streamSse(response)) {
|
||||
yield chunk.choices[0].delta.content;
|
||||
if (chunk.choices?.[0].delta) {
|
||||
yield chunk.choices[0].delta.content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -358,7 +360,7 @@ class VertexAI extends BaseLLM {
|
|||
}
|
||||
|
||||
supportsFim(): boolean {
|
||||
return ["code-gecko", "codestral-latest"].includes(this.model);
|
||||
return this.model.includes("code-gecko") || this.model.includes("codestral");
|
||||
}
|
||||
|
||||
protected async _embed(chunks: string[]): Promise<number[][]> {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue