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

feat: support customizing gemini safeSettings #375

Merged
merged 2 commits into from
Mar 25, 2024
Merged

feat: support customizing gemini safeSettings #375

merged 2 commits into from
Mar 25, 2024

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Mar 25, 2024

Now users can use the block_threshold to customize safeSettings for Gemini models

clients:
  # See https://ai.google.dev/docs
  - type: gemini
    api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
++  block_threshold: BLOCK_NONE                       # Optional field, choices: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE

  - type: vertexai
    api_base: https://{REGION}-aiplatform.googleapis.com/v1/projects/{PROJECT_ID}/locations/{REGION}/publishers/google/models
    # Setup Application Default Credentials (ADC) file, Optional field
    # Run `gcloud auth application-default login` to setup adc
    # see https://cloud.google.com/docs/authentication/external/set-up-adc
    adc_file: <path-to/gcloud/application_default_credentials.json> 
++  block_threshold: BLOCK_ONLY_HIGH                  # Optional field, choices: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE

close #367

@sigoden sigoden merged commit 7f05dc1 into main Mar 25, 2024
3 checks passed
@sigoden sigoden deleted the feat-gemini branch March 25, 2024 13:06
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.

allow enabling and disabling Gemini safety features in config
1 participant