pub struct ExtractOptions {
pub schema: Option<HashMap<String, Value>>,
pub prompt: Option<String>,
}Expand description
Options for the extract operation.
Fields§
§schema: Option<HashMap<String, Value>>JSON schema defining what to extract.
prompt: Option<String>Natural language description of what to extract.
Implementations§
Source§impl ExtractOptions
impl ExtractOptions
Sourcepub fn with_schema(self, schema: HashMap<String, Value>) -> Self
pub fn with_schema(self, schema: HashMap<String, Value>) -> Self
Sets a JSON schema defining what to extract.
Sourcepub fn with_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_prompt(self, prompt: impl Into<String>) -> Self
Sets a natural language prompt describing what to extract.
Trait Implementations§
Source§impl Clone for ExtractOptions
impl Clone for ExtractOptions
Source§impl Debug for ExtractOptions
impl Debug for ExtractOptions
Auto Trait Implementations§
impl Forget for ExtractOptions
impl Freeze for ExtractOptions
impl RefUnwindSafe for ExtractOptions
impl Send for ExtractOptions
impl Sync for ExtractOptions
impl Unpin for ExtractOptions
impl UnsafeUnpin for ExtractOptions
impl UnwindSafe for ExtractOptions
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