Struct async_openai_wasm::Batches
source · pub struct Batches<'c> { /* private fields */ }
Expand description
Create large batches of API requests for asynchronous processing. The Batch API returns completions within 24 hours for a 50% discount.
Related guide: Batch
Implementations§
source§impl<'c> Batches<'c>
impl<'c> Batches<'c>
pub fn new(client: &'c Client) -> Self
sourcepub async fn create(&self, request: BatchRequest) -> Result<Batch, OpenAIError>
pub async fn create(&self, request: BatchRequest) -> Result<Batch, OpenAIError>
Creates and executes a batch from an uploaded file of requests
sourcepub async fn list<Q>(
&self,
query: &Q
) -> Result<ListBatchesResponse, OpenAIError>
pub async fn list<Q>( &self, query: &Q ) -> Result<ListBatchesResponse, OpenAIError>
List your organization’s batches.
Auto Trait Implementations§
impl<'c> Freeze for Batches<'c>
impl<'c> !RefUnwindSafe for Batches<'c>
impl<'c> !Send for Batches<'c>
impl<'c> !Sync for Batches<'c>
impl<'c> Unpin for Batches<'c>
impl<'c> !UnwindSafe for Batches<'c>
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