pub struct ObjectOutput<T> { /* private fields */ }Expand description
A JSON object validated by a schema.
Implementations§
Trait Implementations§
Source§impl<T> Debug for ObjectOutput<T>
impl<T> Debug for ObjectOutput<T>
Source§impl<T: DeserializeOwned + Send + Sync + 'static> OutputHandler<T> for ObjectOutput<T>
impl<T: DeserializeOwned + Send + Sync + 'static> OutputHandler<T> for ObjectOutput<T>
Source§fn response_format(&self) -> Option<ResponseFormat>
fn response_format(&self) -> Option<ResponseFormat>
The response format sent to the model.
Source§fn parse_complete(&self, text: &str, ctx: &OutputContext) -> Result<T, Error>
fn parse_complete(&self, text: &str, ctx: &OutputContext) -> Result<T, Error>
Parses the complete text of the final step. Read more
Source§fn parse_partial(&self, text: &str) -> Option<JsonValue>
fn parse_partial(&self, text: &str) -> Option<JsonValue>
Parses partial text during streaming;
None when nothing usable is
available yet.Source§fn typed_partial(&self, value: &JsonValue) -> Option<T>
fn typed_partial(&self, value: &JsonValue) -> Option<T>
Converts a partial JSON value into the typed output when it already
satisfies the schema.
Source§fn wants_output(&self) -> bool
fn wants_output(&self) -> bool
Whether the call must produce an output (
false only for NoOutput).Auto Trait Implementations§
impl<T> !RefUnwindSafe for ObjectOutput<T>
impl<T> !UnwindSafe for ObjectOutput<T>
impl<T> Freeze for ObjectOutput<T>
impl<T> Send for ObjectOutput<T>
impl<T> Sync for ObjectOutput<T>
impl<T> Unpin for ObjectOutput<T>
impl<T> UnsafeUnpin for ObjectOutput<T>where
Schema<T>: 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