pub struct GeminiConfig { /* private fields */ }Expand description
Gemini credentials and endpoint configuration.
let config = providers_kit::config::GeminiConfig::new(
providers_kit::config::ApiKey::new("gemini-test")?,
);
let _ = config;
Implementations§
Source§impl GeminiConfig
impl GeminiConfig
Sourcepub fn new(api_key: ApiKey) -> Self
pub fn new(api_key: ApiKey) -> Self
Creates a configuration for the public Gemini endpoint.
This only constructs configuration; provider operations perform network I/O.
§Examples
use providers_kit::config::{ApiKey, GeminiConfig};
let config = GeminiConfig::new(ApiKey::new("example-key")?);
let _owned_configuration = config;
Sourcepub fn with_base_url(self, base_url: Url) -> Self
pub fn with_base_url(self, base_url: Url) -> Self
Replaces the API base URL.
This only constructs configuration; provider operations perform network I/O.
§Examples
use providers_kit::config::{ApiKey, GeminiConfig};
let config = GeminiConfig::new(ApiKey::new("example-key")?);
let config = config.with_base_url("https://example.com/api".parse().unwrap());
let _owned_configuration = config;
Sourcepub fn with_service_tier(self, service_tier: GeminiServiceTier) -> Self
pub fn with_service_tier(self, service_tier: GeminiServiceTier) -> Self
Replaces the request service tier.
The selected endpoint/model determines support; configuration does not probe it.
§Examples
use providers_kit::config::{ApiKey, GeminiConfig, GeminiServiceTier};
let _config = GeminiConfig::new(ApiKey::new("example-key")?)
.with_service_tier(GeminiServiceTier::Standard);
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GeminiConfig
impl RefUnwindSafe for GeminiConfig
impl Send for GeminiConfig
impl Sync for GeminiConfig
impl Unpin for GeminiConfig
impl UnsafeUnpin for GeminiConfig
impl UnwindSafe for GeminiConfig
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