pub struct GeminiGenerateContentConfig {
pub provider_ref: String,
pub model: String,
pub endpoint_base: String,
pub max_input_tokens: Option<u32>,
}Expand description
Configuration for the live Gemini generateContent adapter.
Fields§
§provider_ref: StringStable provider ref exposed through ProviderCapabilities.
model: StringGemini model id.
endpoint_base: StringGemini API base URL.
max_input_tokens: Option<u32>Maximum input tokens advertised by this route.
Implementations§
Source§impl GeminiGenerateContentConfig
impl GeminiGenerateContentConfig
Sourcepub fn new(model: impl Into<String>) -> Self
pub fn new(model: impl Into<String>) -> Self
Creates a config for the hosted Gemini generateContent API.
Sourcepub fn provider_ref(self, provider_ref: impl Into<String>) -> Self
pub fn provider_ref(self, provider_ref: impl Into<String>) -> Self
Sets the stable provider ref used in SDK capability metadata.
Sourcepub fn endpoint_base(self, endpoint_base: impl Into<String>) -> Self
pub fn endpoint_base(self, endpoint_base: impl Into<String>) -> Self
Sets a custom API base URL.
Sourcepub fn max_input_tokens(self, max_input_tokens: u32) -> Self
pub fn max_input_tokens(self, max_input_tokens: u32) -> Self
Sets the maximum input token limit advertised for this route.
Trait Implementations§
Source§impl Clone for GeminiGenerateContentConfig
impl Clone for GeminiGenerateContentConfig
Source§fn clone(&self) -> GeminiGenerateContentConfig
fn clone(&self) -> GeminiGenerateContentConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GeminiGenerateContentConfig
impl Debug for GeminiGenerateContentConfig
Source§impl PartialEq for GeminiGenerateContentConfig
impl PartialEq for GeminiGenerateContentConfig
Source§fn eq(&self, other: &GeminiGenerateContentConfig) -> bool
fn eq(&self, other: &GeminiGenerateContentConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for GeminiGenerateContentConfig
impl StructuralPartialEq for GeminiGenerateContentConfig
Auto Trait Implementations§
impl Freeze for GeminiGenerateContentConfig
impl RefUnwindSafe for GeminiGenerateContentConfig
impl Send for GeminiGenerateContentConfig
impl Sync for GeminiGenerateContentConfig
impl Unpin for GeminiGenerateContentConfig
impl UnsafeUnpin for GeminiGenerateContentConfig
impl UnwindSafe for GeminiGenerateContentConfig
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