FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    AiProviderConfig

    struct · ferroui-protranslate-studio · v0.5.0

    struct AiProviderConfig
    

    Serializable host configuration. Debug output redacts the API key.

    View source

    Members

    provider

    provider: AiProvider
    

    Source

    api_key

    api_key: String
    

    Source

    model_id

    model_id: String
    

    Explicit model selection from live discovery or a host-supplied compatible ID. Empty configurations can discover models but cannot translate.

    Source

    base_url

    base_url: String
    

    Source

    is_enabled

    is_enabled: bool
    

    Source

    max_tokens

    max_tokens: u32
    

    Source

    temperature

    temperature: f64
    

    Source

    omit_temperature

    omit_temperature: bool
    

    Omit the temperature field for models which do not accept sampling parameters. Enabled by default; opt into sampling only for a model that supports it.

    Source

    legacy_max_tokens

    legacy_max_tokens: bool
    

    Use max_tokens for older OpenAI-compatible servers; otherwise max_completion_tokens.

    Source

    for_provider

    fn for_provider(provider: AiProvider) -> Self
    

    Source

    is_configured

    fn is_configured(self: &Self) -> bool
    

    Source

    validate

    fn validate(self: &Self) -> Result<(), StudioError>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • CloneToUninit
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ToOwned
    • DeserializeOwned
    • ErasedDestructor
    • IntoEither
    • Clone
    • StructuralPartialEq
    • PartialEq
    • Serialize
    • Debug
    • Default
    • Deserialize<'de>

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.