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

How to use OpenAI client with Mistral? #64

Open
punkpeye opened this issue Dec 4, 2024 · 2 comments
Open

How to use OpenAI client with Mistral? #64

punkpeye opened this issue Dec 4, 2024 · 2 comments

Comments

@punkpeye
Copy link

punkpeye commented Dec 4, 2024

I have tried:

return new OpenAI({
  apiKey: config.MISTRAL_API_KEY,
  baseURL: 'https://api.mistral.ai/v1',
});

but I am getting:

could not stream assistant response
422 status code (no body)

@GaspardBT
Copy link
Collaborator

Hey thanks for opening this issue, could you share the full code (or a reproducible snippet)?

@punkpeye
Copy link
Author

punkpeye commented Dec 5, 2024

This is the full code. The rest is just calling completion endpoint.

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