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§
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) -> Selfwhere
Self: Sized,
fn with_api_port<S: AsRef<str>>(self, port: S) -> Selfwhere
Self: Sized,
fn with_api_key<S: Into<String>>(self, api_key: S) -> Selfwhere
Self: Sized,
Sourcefn with_api_key_env_var<S: Into<String>>(self, api_key_env_var: S) -> Selfwhere
Self: Sized,
fn with_api_key_env_var<S: Into<String>>(self, api_key_env_var: S) -> Selfwhere
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".