clippy++ and report internal error types from tools
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user