Skip to main content

LLMApiConfigTrait

Trait LLMApiConfigTrait 

Source
pub trait LLMApiConfigTrait {
    // Required methods
    fn api_base_config_mut(&mut self) -> &mut ApiConfig;
    fn api_config(&self) -> &ApiConfig;

    // Provided methods
    fn with_api_host<S: AsRef<str>>(self, host: S) -> Self
       where Self: Sized { ... }
    fn with_api_port<S: AsRef<str>>(self, port: S) -> Self
       where Self: Sized { ... }
    fn with_api_key<S: Into<String>>(self, api_key: S) -> Self
       where Self: Sized { ... }
    fn with_api_key_env_var<S: Into<String>>(self, api_key_env_var: S) -> Self
       where Self: Sized { ... }
}

Required Methods§

Provided Methods§

Source

fn with_api_host<S: AsRef<str>>(self, host: S) -> Self
where Self: Sized,

Source

fn with_api_port<S: AsRef<str>>(self, port: S) -> Self
where Self: Sized,

Source

fn with_api_key<S: Into<String>>(self, api_key: S) -> Self
where Self: Sized,

Source

fn with_api_key_env_var<S: Into<String>>(self, api_key_env_var: S) -> Self
where Self: Sized,

Set the environment variable name for the API key. Default is set from the backend.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§