pub struct ExtractorRun<'a, T>{ /* private fields */ }Expand description
A single extraction run with an overridden default model.
The model is the default candidate for every retry in this run;
model-selection hooks may replace it before each attempt. The originating
Extractor’s default model is unchanged.
Implementations§
Source§impl<T> ExtractorRun<'_, T>
impl<T> ExtractorRun<'_, T>
Sourcepub async fn extract(
&self,
text: impl Into<Message> + WasmCompatSend,
) -> Result<T, ExtractionError>
pub async fn extract( &self, text: impl Into<Message> + WasmCompatSend, ) -> Result<T, ExtractionError>
Extract structured data with the run-local model.
Sourcepub async fn extract_with_chat_history(
&self,
text: impl Into<Message> + WasmCompatSend,
chat_history: Vec<Message>,
) -> Result<T, ExtractionError>
pub async fn extract_with_chat_history( &self, text: impl Into<Message> + WasmCompatSend, chat_history: Vec<Message>, ) -> Result<T, ExtractionError>
Extract structured data with chat history and the run-local model.
Sourcepub async fn extract_with_usage(
&self,
text: impl Into<Message> + WasmCompatSend,
) -> Result<ExtractionResponse<T>, ExtractionError>
pub async fn extract_with_usage( &self, text: impl Into<Message> + WasmCompatSend, ) -> Result<ExtractionResponse<T>, ExtractionError>
Extract structured data and usage with the run-local model.
Sourcepub async fn extract_with_chat_history_with_usage(
&self,
text: impl Into<Message> + WasmCompatSend,
chat_history: Vec<Message>,
) -> Result<ExtractionResponse<T>, ExtractionError>
pub async fn extract_with_chat_history_with_usage( &self, text: impl Into<Message> + WasmCompatSend, chat_history: Vec<Message>, ) -> Result<ExtractionResponse<T>, ExtractionError>
Extract structured data with chat history and usage using the run-local model.
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for ExtractorRun<'a, T>
impl<'a, T> !UnwindSafe for ExtractorRun<'a, T>
impl<'a, T> Freeze for ExtractorRun<'a, T>
impl<'a, T> Send for ExtractorRun<'a, T>
impl<'a, T> Sync for ExtractorRun<'a, T>
impl<'a, T> Unpin for ExtractorRun<'a, T>
impl<'a, T> UnsafeUnpin for ExtractorRun<'a, T>
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