-
Notifications
You must be signed in to change notification settings - Fork 3
[BUG] Input should be 'stop' but received 'STOP' #2
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
Comments
👨🏻🌾 The agent is at work! |
🐛 Bug Fix: Normalize Finish Reason Case in OpenAI ProviderAfter analyzing the issue where
|
Hi Bruno, Thank you for the issue and a fix, i've also seen this problem in my own experiments. |
Looks like i've fixed it. Instead of .lower() on finish_reason i've decided to relax response validation alltogether, similarly to how it is done in OpenAI's client. @BrunoGeorgevich thanks once again for reporting this error! Feel free to try fixed version: |
I'm gonna close the issue as fixed right now, feel free to reopen if the problem persists! |
I've sent the a request to the
gemini-2.0-flash-001
and i've got the following error:Code:
It seems that the expected answer is
stop
but i've gotSTOP
. Maybe a.lower()
solve the problem.The same code works with
deepseek
andopenai
models.Thank you very much for your work. The library is amazing!
The text was updated successfully, but these errors were encountered: