Trait ToolDispatcher
pub trait ToolDispatcher: Send + Sync {
// Required methods
fn parse_response(
&self,
response: &ChatResponse,
) -> (String, Vec<ParsedToolCall>);
fn format_results(
&self,
results: &[ToolExecutionResult],
) -> ConversationMessage;
fn prompt_instructions(&self, tools: &[Box<dyn Tool>]) -> String;
fn to_provider_messages(
&self,
history: &[ConversationMessage],
) -> Vec<ChatMessage>;
fn should_send_tool_specs(&self) -> bool;
}Required Methods§
fn parse_response( &self, response: &ChatResponse, ) -> (String, Vec<ParsedToolCall>)
fn format_results(&self, results: &[ToolExecutionResult]) -> ConversationMessage
fn prompt_instructions(&self, tools: &[Box<dyn Tool>]) -> String
fn to_provider_messages( &self, history: &[ConversationMessage], ) -> Vec<ChatMessage>
fn should_send_tool_specs(&self) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".