pub struct JsonOutput { /* private fields */ }Expand description
Unconstrained (or raw-schema-validated) JSON.
Implementations§
Trait Implementations§
Source§impl Clone for JsonOutput
impl Clone for JsonOutput
Source§fn clone(&self) -> JsonOutput
fn clone(&self) -> JsonOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JsonOutput
impl Debug for JsonOutput
Source§impl OutputHandler<Value> for JsonOutput
impl OutputHandler<Value> for JsonOutput
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<JsonValue, Error>
fn parse_complete( &self, text: &str, ctx: &OutputContext, ) -> Result<JsonValue, 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<JsonValue>
fn typed_partial(&self, value: &JsonValue) -> Option<JsonValue>
Converts a partial JSON value into the typed output when it already
satisfies the schema.
Source§fn validate_configuration(&self) -> Result<(), Error>
fn validate_configuration(&self) -> Result<(), Error>
Validates strategy settings before a model request is made. Read more
Source§fn wants_output(&self) -> bool
fn wants_output(&self) -> bool
Whether the call must produce an output (
false only for NoOutput).Source§fn parse_elements(&self, _text: &str) -> Option<Vec<JsonValue>>
fn parse_elements(&self, _text: &str) -> Option<Vec<JsonValue>>
Array strategies: the complete, validated elements contained in the
partial text so far.
Source§fn parse_typed_elements(&self, text: &str) -> Option<O>
fn parse_typed_elements(&self, text: &str) -> Option<O>
Returns completed typed array elements after schema validation.
Source§fn max_elements(&self) -> Option<usize>
fn max_elements(&self) -> Option<usize>
Maximum number of elements an array stream may publish.
Auto Trait Implementations§
impl !RefUnwindSafe for JsonOutput
impl !UnwindSafe for JsonOutput
impl Freeze for JsonOutput
impl Send for JsonOutput
impl Sync for JsonOutput
impl Unpin for JsonOutput
impl UnsafeUnpin for JsonOutput
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