pub struct MalformedCall { /* private fields */ }Expand description
A tool call whose arguments are not a JSON object. It has no parsed
arguments and is never executed; answer it with MalformedCall::answer.
It cannot be answered as executed:
ⓘ
fn answer(call: MalformedCall) {
let _ = call.answer(ToolResult::success(ToolOutput::text("wrote 5 bytes")));
}Nor read as a call to execute:
ⓘ
fn arguments(call: &MalformedCall) {
let _ = call.tool_call();
}Implementations§
Source§impl MalformedCall
impl MalformedCall
Sourcepub fn raw_arguments(&self) -> &str
pub fn raw_arguments(&self) -> &str
The arguments text exactly as the model sent it.
Sourcepub fn answer(self, action: Option<InvalidToolCallAction>) -> ToolAnswer
pub fn answer(self, action: Option<InvalidToolCallAction>) -> ToolAnswer
Answer this call with the invalid-call hook’s action, or None when no
hook decided. None and InvalidToolCallAction::Retry tell the model
to call again, Skip answers with a skipped result, and Stop, Fail
and Repair end the run when the answer is applied.
Trait Implementations§
Source§impl Clone for MalformedCall
impl Clone for MalformedCall
Source§impl Debug for MalformedCall
impl Debug for MalformedCall
Source§impl<'de> Deserialize<'de> for MalformedCall
impl<'de> Deserialize<'de> for MalformedCall
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for MalformedCall
impl Freeze for MalformedCall
impl Move for MalformedCall
impl RefUnwindSafe for MalformedCall
impl Send for MalformedCall
impl Sync for MalformedCall
impl Unpin for MalformedCall
impl UnsafeUnpin for MalformedCall
impl UnwindSafe for MalformedCall
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> 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> IntoToolOutput for Twhere
T: Serialize + 'static,
impl<T> IntoToolOutput for Twhere
T: Serialize + 'static,
Source§fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
fn into_tool_output(self) -> Result<ToolOutput, ToolExecutionError>
Convert this value without routing structured data through a string.