Skip to content

Commit a449209

Browse files
committed
fix: resolve TypeScript type issue in completePrompt method
1 parent 470b78a commit a449209

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/providers/mistral.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ export class MistralHandler extends BaseProvider implements SingleCompletionHand
120120
if (Array.isArray(content)) {
121121
// Only return text content, filter out thinking content for non-streaming
122122
return content
123-
.filter((c: MistralContent) => typeof c === "object" && c.type === "text")
124-
.map((c: MistralContent) => (c as MistralTextContent).text || "")
123+
.filter((c: any) => typeof c === "object" && c !== null && c.type === "text")
124+
.map((c: any) => c.text || "")
125125
.join("")
126126
}
127127

0 commit comments

Comments
 (0)