pub struct StartBatch { /* private fields */ }Expand description
Builder returned by start_batch; .await submits the batch.
Implementations§
Source§impl StartBatch
impl StartBatch
Sourcepub fn webhook_url(self, url: Url) -> Self
pub fn webhook_url(self, url: Url) -> Self
URL the provider calls when the batch completes.
Sourcepub fn download(self, download: Arc<dyn DownloadFn>) -> Self
pub fn download(self, download: Arc<dyn DownloadFn>) -> Self
Sets the function used to fetch prompt URLs the provider cannot.
Source§impl StartBatch
impl StartBatch
Sourcepub fn header(self, name: &str, value: &str) -> Self
pub fn header(self, name: &str, value: &str) -> Self
Adds one request header; invalid names or values are ignored.
Sourcepub fn provider_options(self, options: ProviderOptions) -> Self
pub fn provider_options(self, options: ProviderOptions) -> Self
Sets the provider-specific options.
Sourcepub fn provider_option(
self,
provider: impl Into<String>,
options: JsonObject,
) -> Self
pub fn provider_option( self, provider: impl Into<String>, options: JsonObject, ) -> Self
Sets the options of one provider.
Sourcepub fn cancellation(self, token: CancellationToken) -> Self
pub fn cancellation(self, token: CancellationToken) -> Self
Sets the cancellation token.
Sourcepub fn telemetry(self, options: TelemetryOptions) -> Self
pub fn telemetry(self, options: TelemetryOptions) -> Self
Sets the telemetry options.
Trait Implementations§
Source§impl Debug for StartBatch
impl Debug for StartBatch
Source§impl IntoFuture for StartBatch
impl IntoFuture for StartBatch
Source§type Output = Result<BatchStartResult, Error>
type Output = Result<BatchStartResult, Error>
The output that the future will produce on completion.
Source§type IntoFuture = Pin<Box<dyn Future<Output = <StartBatch as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <StartBatch as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StartBatch
impl !UnwindSafe for StartBatch
impl Freeze for StartBatch
impl Send for StartBatch
impl Sync for StartBatch
impl Unpin for StartBatch
impl UnsafeUnpin for StartBatch
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