pub enum ModelBlockError {
EndTurnWithToolCalls {
count: usize,
},
ToolUseWithoutToolCalls,
BlockIdCountMismatch {
expected: usize,
actual: usize,
},
EmptyToolName {
tool_index: usize,
},
ArgumentsNotObject {
tool_index: usize,
},
}Expand description
Why a model response cannot be converted into blocks.
Variants§
EndTurnWithToolCalls
EndTurn cannot include tool declarations.
ToolUseWithoutToolCalls
ToolUse requires at least one tool declaration.
BlockIdCountMismatch
The supplied identities do not match the response’s material count.
Fields
EmptyToolName
A tool declaration’s name is blank.
ArgumentsNotObject
A tool declaration’s arguments are not a JSON object.
Trait Implementations§
Source§impl Clone for ModelBlockError
impl Clone for ModelBlockError
Source§impl Debug for ModelBlockError
impl Debug for ModelBlockError
Source§impl Display for ModelBlockError
impl Display for ModelBlockError
impl Eq for ModelBlockError
Source§impl Error for ModelBlockError
impl Error for ModelBlockError
1.30.0 · 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 PartialEq for ModelBlockError
impl PartialEq for ModelBlockError
impl StructuralPartialEq for ModelBlockError
Auto Trait Implementations§
impl Freeze for ModelBlockError
impl RefUnwindSafe for ModelBlockError
impl Send for ModelBlockError
impl Sync for ModelBlockError
impl Unpin for ModelBlockError
impl UnsafeUnpin for ModelBlockError
impl UnwindSafe for ModelBlockError
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