pub struct StructuredDecodeContext {
pub raw: String,
pub finish_reason: FinishReason,
pub usage: Usage,
pub meta: Meta,
}Expand description
What Error::StructuredDecode carries about the response that failed to
decode – everything a RepairStrategy
needs to try salvaging it, or that a successfully-repaired
StructuredResponse needs to be
complete.
Fields§
§raw: StringThe exact text the provider sent that didn’t decode – whatever
didn’t parse as JSON, or empty if the provider sent no relevant
content at all (see each provider’s parse_structured_response for
when that happens).
finish_reason: FinishReasonWhat the response’s finish reason would have been, had decoding succeeded.
usage: UsageWhat the response’s token usage would have been, had decoding succeeded.
meta: MetaWhat the response’s metadata would have been, had decoding succeeded.
Trait Implementations§
Source§impl Clone for StructuredDecodeContext
impl Clone for StructuredDecodeContext
Auto Trait Implementations§
impl Freeze for StructuredDecodeContext
impl RefUnwindSafe for StructuredDecodeContext
impl Send for StructuredDecodeContext
impl Sync for StructuredDecodeContext
impl Unpin for StructuredDecodeContext
impl UnsafeUnpin for StructuredDecodeContext
impl UnwindSafe for StructuredDecodeContext
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