pub struct GeminiParams {
pub model: Option<String>,
pub api_key: Option<String>,
pub vertexai: Option<bool>,
pub project: Option<String>,
pub location: Option<String>,
pub headers: Option<Value>,
}Expand description
The parameters for creating a Gemini instance.
Fields§
§model: Option<String>The name of the model to use. Defaults to ‘gemini-2.5-flash’.
api_key: Option<String>The API key to use for the Gemini API. If not provided, it will look for the GOOGLE_GENAI_API_KEY or GEMINI_API_KEY environment variable.
vertexai: Option<bool>Whether to use Vertex AI. If true, project, location should be provided.
project: Option<String>The Vertex AI project ID. Required if vertexai is true.
location: Option<String>The Vertex AI location. Required if vertexai is true.
headers: Option<Value>Headers to merge with internally crafted headers.
Trait Implementations§
Source§impl Clone for GeminiParams
impl Clone for GeminiParams
Source§fn clone(&self) -> GeminiParams
fn clone(&self) -> GeminiParams
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 moreSource§impl Debug for GeminiParams
impl Debug for GeminiParams
Source§impl Default for GeminiParams
impl Default for GeminiParams
Source§fn default() -> GeminiParams
fn default() -> GeminiParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GeminiParams
impl RefUnwindSafe for GeminiParams
impl Send for GeminiParams
impl Sync for GeminiParams
impl Unpin for GeminiParams
impl UnwindSafe for GeminiParams
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