pub struct ExtractorBuilder<M, T>where
M: CompletionModel,
T: JsonSchema + for<'a> Deserialize<'a> + Serialize + WasmCompatSend + WasmCompatSync + 'static,{ /* private fields */ }Expand description
Builder for the Extractor
Implementations§
Source§impl<M, T> ExtractorBuilder<M, T>where
M: CompletionModel,
T: JsonSchema + for<'a> Deserialize<'a> + Serialize + WasmCompatSend + WasmCompatSync + 'static,
impl<M, T> ExtractorBuilder<M, T>where
M: CompletionModel,
T: JsonSchema + for<'a> Deserialize<'a> + Serialize + WasmCompatSend + WasmCompatSync + 'static,
pub fn new(model: M) -> Self
Sourcepub fn dynamic_context<I>(self, samples: usize, index: I) -> Selfwhere
I: VectorStoreIndexDyn + 'static,
pub fn dynamic_context<I>(self, samples: usize, index: I) -> Selfwhere
I: VectorStoreIndexDyn + 'static,
Add dynamic context retrieved from a vector store on every extraction attempt.
This delegates to AgentBuilder::dynamic_context and therefore uses the
same completion-call hook lifecycle as an agent.
pub fn additional_params(self, params: Value) -> Self
Sourcepub fn max_tokens(self, max_tokens: u64) -> Self
pub fn max_tokens(self, max_tokens: u64) -> Self
Set the maximum number of tokens for the completion
Sourcepub fn retries(self, retries: u64) -> Self
pub fn retries(self, retries: u64) -> Self
Set the maximum number of retries for the extractor.
Sourcepub fn tool_choice(self, choice: ToolChoice) -> Self
pub fn tool_choice(self, choice: ToolChoice) -> Self
Set the tool_choice option for the inner Agent.
Auto Trait Implementations§
impl<M, T> !RefUnwindSafe for ExtractorBuilder<M, T>
impl<M, T> !UnwindSafe for ExtractorBuilder<M, T>
impl<M, T> Freeze for ExtractorBuilder<M, T>where
M: Freeze,
impl<M, T> Send for ExtractorBuilder<M, T>
impl<M, T> Sync for ExtractorBuilder<M, T>
impl<M, T> Unpin for ExtractorBuilder<M, T>
impl<M, T> UnsafeUnpin for ExtractorBuilder<M, T>where
M: UnsafeUnpin,
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