Use Result<String, FunctionCallError> for all tool handling code and rely on error propagation instead of creating failed items everywhere.
8 lines
137 B
Rust
8 lines
137 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error, PartialEq)]
|
|
pub enum FunctionCallError {
|
|
#[error("{0}")]
|
|
RespondToModel(String),
|
|
}
|