Skip to content

Abstract and implement Safety Settings across providers #59

Description

@luckenco

The current Gemini provider implementation (src/provider/gemini.rs) lacks support for safetySettings.

Instead of just adding it for Gemini, we should create a cross-provider abstraction in the core StructuredRequest or GenerationConfig.

Requirements:

  1. Define a provider-agnostic safety configuration in src/core/types.rs (or similar).
    • Needs generic categories (e.g., Hate Speech, Dangerous Content).
    • Needs generic thresholds (e.g., Block None, Block Low, Block Medium).
  2. Map these generic settings to provider-specific formats.
    • Implement mapping for Gemini (SafetySetting with category and threshold).
    • (Optional) Investigate/Stub mappings for other providers.
  3. Update GeminiRequest to include the safetySettings field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions