Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mistral: Argument of type 'AsyncGenerator<ChatCompletionResponseChunk, void, unknown>' is not assignable to parameter of type 'Response | AsyncIterableOpenAIStreamReturnTypes'. #936

Closed
baptisteArno opened this issue Jan 22, 2024 · 1 comment

Comments

@baptisteArno
Copy link

Description

Mistral updated their library with types.

But there is now a type mismatch when piping the stream response to OpenAIStream

Code example

const response = client.chatStream({
          model: options.model,
          messages: parseMessages({ options, variables }),
        })

return OpenAIStream(response)
                  // ^^^ Argument of type 'AsyncGenerator<ChatCompletionResponseChunk, void, unknown>' is not assignable to parameter of type 'Response | AsyncIterableOpenAIStreamReturnTypes'. 

Additional context

No response

@baptisteArno baptisteArno changed the title Mistral: Argument of type 'AsyncGenerator<ChatCompletionResponseChunk, void, unknown>' is not assignable to parameter of type 'Response | AsyncIterableOpenAIStreamReturnTypes'. Mistral: Argument of type 'AsyncGenerator<ChatCompletionResponseChunk, void, unknown>' is not assignable to parameter of type 'Response | AsyncIterableOpenAIStreamReturnTypes'. Jan 22, 2024
@lgrammel
Copy link
Collaborator

Please try our new Mistral provider for AI SDK Core: https://sdk.vercel.ai/providers/ai-sdk-providers/mistral

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants