Struct git_iris::config::ProviderConfig
source · pub struct ProviderConfig {
pub api_key: String,
pub model: String,
pub additional_params: HashMap<String, String>,
pub token_limit: Option<usize>,
}
Expand description
Provider-specific configuration structure
Fields§
§api_key: String
API key for the provider
model: String
Model to be used with the provider
additional_params: HashMap<String, String>
Additional parameters for the provider
token_limit: Option<usize>
Token limit, if set by the user
Implementations§
source§impl ProviderConfig
impl ProviderConfig
sourcepub fn default_for(provider: &str) -> Self
pub fn default_for(provider: &str) -> Self
Create a default provider configuration for a given provider
sourcepub fn get_token_limit(&self) -> usize
pub fn get_token_limit(&self) -> usize
Get the token limit for this provider configuration
sourcepub fn to_llm_provider_config(&self) -> LLMProviderConfig
pub fn to_llm_provider_config(&self) -> LLMProviderConfig
Convert to LLMProviderConfig
Trait Implementations§
source§impl Clone for ProviderConfig
impl Clone for ProviderConfig
source§fn clone(&self) -> ProviderConfig
fn clone(&self) -> ProviderConfig
Returns a copy 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 moresource§impl Debug for ProviderConfig
impl Debug for ProviderConfig
source§impl Default for ProviderConfig
impl Default for ProviderConfig
source§fn default() -> ProviderConfig
fn default() -> ProviderConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ProviderConfig
impl<'de> Deserialize<'de> for ProviderConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProviderConfig
impl RefUnwindSafe for ProviderConfig
impl Send for ProviderConfig
impl Sync for ProviderConfig
impl Unpin for ProviderConfig
impl UnwindSafe for ProviderConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more