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

[BUG] safety settings Gemini broken #718

Closed
1 task
darthalex2014 opened this issue Jan 7, 2025 · 5 comments
Closed
1 task

[BUG] safety settings Gemini broken #718

darthalex2014 opened this issue Jan 7, 2025 · 5 comments
Labels
type: bug Something isn't working

Comments

@darthalex2014
Copy link

Description

Everything was fine yesterday, but today the Censorship (SAFETY) Level switch for Gemini models is completely broken on v2-dev. It doesn't seem to affect anything anymore. All of my prompts that used to work now trigger an error "[Gemini Issue]: Generation stopped due to SAFETY: HARM_CATEGORY_...". (I verified by running an old fork of v2-dev, and it's working fine there.)

Device and browser

Mobile/Desktop, last v2-dev

Screenshots and more

No response

Willingness to Contribute

  • 🙋‍♂️ Yes, I would like to contribute a fix.
@darthalex2014 darthalex2014 added the type: bug Something isn't working label Jan 7, 2025
@darthalex2014
Copy link
Author

Hello, we tried to solve the issue.

Failed to compile.
./src/modules/llms/server/gemini/gemini.router.ts
Error: x 'import', and 'export' cannot be used outside of module code
,-[/vercel/path0/src/modules/llms/server/gemini/gemini.router.ts:22:1]

:(

@darthalex2014
Copy link
Author

I for nothing raised panic.
This is fault of model googleai-models/gemini-2.0-flash-exp.
On all other models such problem is not. Most likely Google something is muddying.

@darthalex2014
Copy link
Author

https://discuss.ai.google.dev/t/flash-2-0-doesnt-respect-block-none-on-all-harm-categories/59352

found a fix instead of BLOCK_NONE we now must use OFF for Flash 2-0, but ONLY for Flash 2-0. if you send OFF with any other model you will get an error

@enricoros
Copy link
Owner

Wow, great find @darthalex2014 . What do you think could be a generic way of solving this in Big-AGI?

@enricoros
Copy link
Owner

You can now update to enjoy the "OFF" filtering. Will work on newer Gemini models, and may trip the older ones. I left both options in, and hopefully Gemini will converge quickly to one or another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@enricoros @darthalex2014 and others