pub enum StructuredError {
Provider(ProviderError),
Core(CoreError),
NotFinished(Box<RunOutcome>),
Invalid {
type_name: &'static str,
error: String,
text: String,
outcome: Option<Box<RunOutcome>>,
},
}Expand description
Why no typed value came back.
Variants§
Provider(ProviderError)
Core(CoreError)
NotFinished(Box<RunOutcome>)
The run ended without a final answer (interrupted for an approval,
a limit, a cancel). Settle an interruption with
AgentStructuredExt::resume_typed: it resumes with the same
structured-output hook the run was started with, which a plain
Agent::resume lacks.
Invalid
The answer still did not parse after the one repair attempt.
outcome is the run’s, for an agent.
Trait Implementations§
Source§impl Debug for StructuredError
impl Debug for StructuredError
Source§impl Display for StructuredError
impl Display for StructuredError
Source§impl Error for StructuredError
impl Error for StructuredError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<CoreError> for StructuredError
impl From<CoreError> for StructuredError
Source§impl From<ProviderError> for StructuredError
impl From<ProviderError> for StructuredError
Source§fn from(source: ProviderError) -> Self
fn from(source: ProviderError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for StructuredError
impl Freeze for StructuredErrorwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const RunOutcome is !null: Freeze,
PhantomData<RunOutcome>: Freeze,
&'static str: Freeze,
impl Move for StructuredError
impl RefUnwindSafe for StructuredError
impl Send for StructuredError
impl Sync for StructuredError
impl Unpin for StructuredError
impl UnsafeUnpin for StructuredErrorwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const RunOutcome is !null: UnsafeUnpin,
PhantomData<RunOutcome>: UnsafeUnpin,
&'static str: UnsafeUnpin,
impl UnwindSafe for StructuredError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more