pub struct ExtractRequest { /* private fields */ }Expand description
Extracts structure from items. Build with Client::extract.
Implementations§
Source§impl ExtractRequest
impl ExtractRequest
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 labels(self, labels: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn labels(self, labels: impl IntoIterator<Item = impl Into<String>>) -> Self
Candidate labels, for zero-shot classifiers and detectors.
Sourcepub fn output_schema(self, schema: Value) -> Self
pub fn output_schema(self, schema: Value) -> Self
JSON schema the model should populate.
Sourcepub fn instruction(self, instruction: impl Into<String>) -> Self
pub fn instruction(self, instruction: impl Into<String>) -> Self
Task instruction.
Sourcepub fn options(self, options: Value) -> Self
pub fn options(self, options: Value) -> Self
Adapter-specific runtime options, merged over the client defaults.
Sourcepub async fn send(self) -> Result<Vec<ExtractResult>>
pub async fn send(self) -> Result<Vec<ExtractResult>>
Send the request.
Sourcepub async fn send_one(self) -> Result<ExtractResult>
pub async fn send_one(self) -> Result<ExtractResult>
Send the request and return the single expected result.
Auto Trait Implementations§
impl !RefUnwindSafe for ExtractRequest
impl !UnwindSafe for ExtractRequest
impl Freeze for ExtractRequest
impl Send for ExtractRequest
impl Sync for ExtractRequest
impl Unpin for ExtractRequest
impl UnsafeUnpin for ExtractRequest
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