pub enum FunctionCallError {
UnsupportedFunction(String),
UnknownArgument {
function: String,
message: String,
},
Invocation {
function: String,
message: String,
},
}Expand description
Errors raised while resolving or invoking an automatic function-calling
tool. Corresponds to Python’s UnknownFunctionCallArgumentError /
UnsupportedFunctionError / FunctionInvocationError.
Variants§
UnsupportedFunction(String)
The model requested a function that was not registered as a tool.
UnknownArgument
The model’s function-call arguments did not match the tool’s schema.
Invocation
The tool’s callable returned an error while executing.
Trait Implementations§
Source§impl Debug for FunctionCallError
impl Debug for FunctionCallError
Source§impl Display for FunctionCallError
impl Display for FunctionCallError
Source§impl Error for FunctionCallError
impl Error for FunctionCallError
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 From<FunctionCallError> for Error
impl From<FunctionCallError> for Error
Source§fn from(source: FunctionCallError) -> Self
fn from(source: FunctionCallError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FunctionCallError
impl RefUnwindSafe for FunctionCallError
impl Send for FunctionCallError
impl Sync for FunctionCallError
impl Unpin for FunctionCallError
impl UnsafeUnpin for FunctionCallError
impl UnwindSafe for FunctionCallError
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