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

Problem with Mistral AI as "drop in" replacement for Openai - extra parameters prevents Mistral completion #7

Open
teddybear082 opened this issue Jan 24, 2024 · 0 comments

Comments

@teddybear082
Copy link

Trying to use Mistral API as a drop in replacement for Openai in a project at the user's discretion, and I get the following error:


2024-01-24 14:17:01,574 INFO: message='OpenAI API response' path=https://api.mistral.ai/v1/chat/completions processing_ms=None request_id=None response_code=422
2024-01-24 14:17:01,574 ERROR: LLM API Error: Invalid response object from API: '{"object":"error","message":"{\\"detail\\":[{\\"type\\":\\"extra_forbidden\\",\\"loc\\":[\\"body\\",\\"frequency_penalty\\"],\\"msg\\":\\"Extra inputs are not permitted\\",\\"input\\":0.0,\\"url\\":\\"https://errors.pydantic.dev/2.5/v/extra_forbidden\\"}]}","type":"internal_error_proxy","param":null,"code":"1000"}' (HTTP response code was 422)

Even if Mistral API does not use other parameters Openai allows, is there a way for it to ignore additional parameters? It would make it a lot easier for clients to offer Mistral API as an alternative to Openai without writing special code just for Mistral. Here, frequency penalty is a standard Openai API parameter: https://platform.openai.com/docs/api-reference/chat.

Thank you for the consideration. I was not sure which repo to put this issue under, but chose documentation since if this will not change it would be good to put a specific note that Mistral does not support any additional errors and will not complete requests with any additional parameters.

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

1 participant