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

Improve handling of Gemini content blocking #2603

Merged
merged 3 commits into from
May 6, 2024

Conversation

yifanmai
Copy link
Collaborator

@yifanmai yifanmai commented May 3, 2024

This fixes three problems:

  • Content blocking detection relies on string matching, which is brittle and likely to break when the Vertex AI library is upgraded
  • Content blocking is handled differently for text and multimodal requests
  • The logged errors for content blocking contain insufficient information

@yifanmai yifanmai requested a review from teetone May 3, 2024 21:53
@yifanmai yifanmai force-pushed the yifanmai/fix-gemini-blocking branch from 0c8cae1 to fe3dbec Compare May 3, 2024 22:53
@yifanmai yifanmai changed the title Improve and unify Gemini content blocking handling Improve handling of Gemini content blocking May 3, 2024
@yifanmai yifanmai merged commit 2ab96c8 into main May 6, 2024
6 checks passed
@yifanmai yifanmai deleted the yifanmai/fix-gemini-blocking branch May 6, 2024 22:47
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

Successfully merging this pull request may close these issues.

2 participants