clippy++ and report internal error types from tools

This commit is contained in:
2026-06-22 13:53:01 +02:00
parent 242771332c
commit 7563ab85ca
12 changed files with 139 additions and 162 deletions
+8 -8
View File
@@ -32,19 +32,19 @@ impl Tool {
}
}
impl Into<ChatCompletionTool> for Tool {
fn into(self) -> ChatCompletionTool {
impl From<Tool> for ChatCompletionTool {
fn from(val: Tool) -> Self {
ChatCompletionTool {
function: FunctionObjectArgs::default()
.name(self.name)
.description(self.description)
.parameters(self.schema).build().unwrap()
.name(val.name)
.description(val.description)
.parameters(val.schema).build().unwrap()
}
}
}
impl Into<ChatCompletionTools> for Tool {
fn into(self) -> ChatCompletionTools {
ChatCompletionTools::Function(self.into())
impl From<Tool> for ChatCompletionTools {
fn from(val: Tool) -> Self {
ChatCompletionTools::Function(val.into())
}
}