Fix for tool use

This commit is contained in:
Dhanji Prasanna
2025-09-20 20:17:50 +10:00
parent 444245d7dd
commit 9a5486f2a8
4 changed files with 385 additions and 43 deletions

View File

@@ -29,6 +29,7 @@ pub struct CompletionRequest {
pub max_tokens: Option<u32>,
pub temperature: Option<f32>,
pub stream: bool,
pub tools: Option<Vec<Tool>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -75,6 +76,13 @@ pub struct ToolCall {
pub args: serde_json::Value,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Tool {
pub name: String,
pub description: String,
pub input_schema: serde_json::Value,
}
pub mod anthropic;
pub use anthropic::AnthropicProvider;