pub struct GoogleBatch { /* private fields */ }Expand description
Batch service backed by batchGenerateContent.
Implementations§
Source§impl GoogleBatch
impl GoogleBatch
Sourcepub fn new(config: SharedConfig) -> Self
pub fn new(config: SharedConfig) -> Self
Creates the service.
Sourcepub fn prepare_request(
&self,
request: &BatchRequest,
) -> Result<PreparedBatchRequest, ProviderError>
pub fn prepare_request( &self, request: &BatchRequest, ) -> Result<PreparedBatchRequest, ProviderError>
Builds the generateContent body of one batch request.
§Errors
Returns the language model’s preparation errors; image requests with a
mask or n > 1 fail with ProviderError::InvalidArgument.
Trait Implementations§
Source§impl Batch for GoogleBatch
impl Batch for GoogleBatch
Source§fn provider(&self) -> &ProviderId
fn provider(&self) -> &ProviderId
Provider identifier.
Source§async fn supported_urls(&self) -> SupportedUrls
async fn supported_urls(&self) -> SupportedUrls
URL patterns the provider can fetch itself (see
LanguageModel).Source§async fn do_start_batch(
&self,
options: BatchStartOptions,
) -> Result<BatchStartResult, ProviderError>
async fn do_start_batch( &self, options: BatchStartOptions, ) -> Result<BatchStartResult, ProviderError>
Starts a batch job.
Source§async fn do_get_batch_status(
&self,
options: BatchOperationOptions,
) -> Result<BatchStatus, ProviderError>
async fn do_get_batch_status( &self, options: BatchOperationOptions, ) -> Result<BatchStatus, ProviderError>
Returns the normalized status of a batch job.
Source§async fn do_get_batch_results(
&self,
options: BatchOperationOptions,
) -> Result<BatchResultStream, ProviderError>
async fn do_get_batch_results( &self, options: BatchOperationOptions, ) -> Result<BatchResultStream, ProviderError>
Streams the results of a finished batch job.
Source§fn supports_cancel_batch(&self) -> bool
fn supports_cancel_batch(&self) -> bool
Whether
do_cancel_batch is implemented.Source§async fn do_cancel_batch(
&self,
options: BatchOperationOptions,
) -> Result<BatchCancelResult, ProviderError>
async fn do_cancel_batch( &self, options: BatchOperationOptions, ) -> Result<BatchCancelResult, ProviderError>
Cancels a batch job.
Source§fn supports_list_batches(&self) -> bool
fn supports_list_batches(&self) -> bool
Whether
do_list_batches is implemented.Source§async fn do_list_batches(
&self,
options: BatchListOptions,
) -> Result<BatchListResult, ProviderError>
async fn do_list_batches( &self, options: BatchListOptions, ) -> Result<BatchListResult, ProviderError>
Lists batch jobs.
Source§impl Clone for GoogleBatch
impl Clone for GoogleBatch
Source§fn clone(&self) -> GoogleBatch
fn clone(&self) -> GoogleBatch
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for GoogleBatch
impl !UnwindSafe for GoogleBatch
impl Freeze for GoogleBatch
impl Send for GoogleBatch
impl Sync for GoogleBatch
impl Unpin for GoogleBatch
impl UnsafeUnpin for GoogleBatch
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DynBatch for Twhere
T: Batch,
impl<T> DynBatch for Twhere
T: Batch,
Source§fn provider(&self) -> &ProviderId
fn provider(&self) -> &ProviderId
See
Batch::provider.