pub struct LlmProviderConfig {
pub id: i64,
pub provider_name: String,
pub base_url: String,
pub provider_type: ProviderType,
pub api_key: String,
pub custom_header: HashMap<String, String>,
}Expand description
Configuration for an LLM provider (vendor endpoint).
Fields§
§id: i64§provider_name: String§base_url: String§provider_type: ProviderType§api_key: String§custom_header: HashMap<String, String>Implementations§
Source§impl LlmProviderConfig
impl LlmProviderConfig
pub fn new( provider_name: impl Into<String>, base_url: impl Into<String>, provider_type: ProviderType, api_key: impl Into<String>, ) -> Self
pub fn custom_header( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn custom_headers(self, headers: HashMap<String, String>) -> Self
Sourcepub fn build_client(&self) -> Client
pub fn build_client(&self) -> Client
Build a Client from this provider configuration.
Trait Implementations§
Source§impl Clone for LlmProviderConfig
impl Clone for LlmProviderConfig
Source§fn clone(&self) -> LlmProviderConfig
fn clone(&self) -> LlmProviderConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LlmProviderConfig
impl RefUnwindSafe for LlmProviderConfig
impl Send for LlmProviderConfig
impl Sync for LlmProviderConfig
impl Unpin for LlmProviderConfig
impl UnsafeUnpin for LlmProviderConfig
impl UnwindSafe for LlmProviderConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more