pub struct GoogleModel {
pub api_key: String,
pub base_url: String,
pub client: Client,
}Fields§
§api_key: String§base_url: String§client: ClientImplementations§
Trait Implementations§
Source§impl LanguageModel for GoogleModel
impl LanguageModel for GoogleModel
Source§fn generate<'life0, 'async_trait>(
&'life0 self,
prompt: Prompt,
options: GenerateOptions,
) -> Pin<Box<dyn Future<Output = Result<GenerateResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate<'life0, 'async_trait>(
&'life0 self,
prompt: Prompt,
options: GenerateOptions,
) -> Pin<Box<dyn Future<Output = Result<GenerateResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generates a single response from the model.
Source§fn generate_stream<'life0, 'async_trait>(
&'life0 self,
prompt: Prompt,
options: GenerateOptions,
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, StreamPart>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_stream<'life0, 'async_trait>(
&'life0 self,
prompt: Prompt,
options: GenerateOptions,
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'static, StreamPart>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generates a streaming response from the model.
Auto Trait Implementations§
impl Freeze for GoogleModel
impl !RefUnwindSafe for GoogleModel
impl Send for GoogleModel
impl Sync for GoogleModel
impl Unpin for GoogleModel
impl UnsafeUnpin for GoogleModel
impl !UnwindSafe for GoogleModel
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