pub struct ResponsesRequest { /* private fields */ }Expand description
Generates a response. Build with Client::responses.
Implementations§
Source§impl ResponsesRequest
impl ResponsesRequest
Sourcepub fn gpu(self, gpu: impl Into<String>) -> Self
pub fn gpu(self, gpu: impl Into<String>) -> Self
Route to a machine profile, optionally pool-qualified as "pool/profile".
Sourcepub fn wait_for_capacity(self, wait: bool) -> Self
pub fn wait_for_capacity(self, wait: bool) -> Self
Whether to wait out provisioning and model loading, or fail fast.
Sourcepub fn provision_timeout(self, timeout: Duration) -> Self
pub fn provision_timeout(self, timeout: Duration) -> Self
Total wall-clock budget for this call, retries included.
Sourcepub fn max_oom_retries(self, retries: u32) -> Self
pub fn max_oom_retries(self, retries: u32) -> Self
Cap on RESOURCE_EXHAUSTED retries. Zero fails fast.
Sourcepub fn max_output_tokens(self, value: u32) -> Self
pub fn max_output_tokens(self, value: u32) -> Self
Cap on generated tokens.
Sourcepub fn temperature(self, value: f64) -> Self
pub fn temperature(self, value: f64) -> Self
Sampling temperature.
Sourcepub async fn send(self) -> Result<ResponseResult>
pub async fn send(self) -> Result<ResponseResult>
Send the request.
Sourcepub async fn estimate(self) -> Result<CostEstimate>
pub async fn estimate(self) -> Result<CostEstimate>
Estimate what this request would cost.
Auto Trait Implementations§
impl !RefUnwindSafe for ResponsesRequest
impl !UnwindSafe for ResponsesRequest
impl Freeze for ResponsesRequest
impl Send for ResponsesRequest
impl Sync for ResponsesRequest
impl Unpin for ResponsesRequest
impl UnsafeUnpin for ResponsesRequest
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