pub struct GoogleAI { /* private fields */ }Implementations§
Source§impl GoogleAI
impl GoogleAI
pub fn new(api_key: String) -> Self
pub fn with_model(self, model: GoogleModel) -> Self
pub fn gemini15_pro(self) -> Self
pub fn gemini15_flash(self) -> Self
pub fn gemini_pro(self) -> Self
pub fn with_temperature(self, temperature: f32) -> Self
pub fn with_max_tokens(self, max_tokens: u32) -> Self
pub fn with_top_p(self, top_p: f32) -> Self
pub fn with_top_k(self, top_k: u32) -> Self
pub fn with_base_url(self, base_url: &str) -> Self
Trait Implementations§
Source§impl LLM for GoogleAI
impl LLM for GoogleAI
fn generate( &self, prompt: &str, ) -> Pin<Box<dyn Future<Output = Result<LLMResult>> + Send + '_>>
fn generate_with_options( &self, prompt: &str, options: LLMOptions, ) -> Pin<Box<dyn Future<Output = Result<LLMResult>> + Send + '_>>
fn chat( &self, messages: Vec<ChatMessage>, ) -> Pin<Box<dyn Future<Output = Result<LLMResult>> + Send + '_>>
fn get_model_name(&self) -> &str
fn get_provider_name(&self) -> &str
fn get_provider_enum(&self) -> ModelProvider
fn supports_function_calling(&self) -> bool
fn supports_json_mode(&self) -> bool
fn max_context_length(&self) -> Option<usize>
fn generate_batch( &self, prompts: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<LLMResult>>> + Send + '_>>
Auto Trait Implementations§
impl Freeze for GoogleAI
impl !RefUnwindSafe for GoogleAI
impl Send for GoogleAI
impl Sync for GoogleAI
impl Unpin for GoogleAI
impl UnsafeUnpin for GoogleAI
impl !UnwindSafe for GoogleAI
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