diff --git a/src/client/bedrock.rs b/src/client/bedrock.rs index 3e9e6ff..107b5f5 100644 --- a/src/client/bedrock.rs +++ b/src/client/bedrock.rs @@ -234,7 +234,7 @@ async fn chat_completions_streaming( } let arguments: Value = function_arguments.parse().with_context(|| { - format!("Tool call '{function_name}' have non-JSON arguments '{function_arguments}'") + format!("Tool call '{function_name}' has non-JSON arguments '{function_arguments}'") })?; handler.tool_call(ToolCall::new( function_name.clone(), @@ -272,7 +272,7 @@ async fn chat_completions_streaming( function_arguments = String::from("{}"); } let arguments: Value = function_arguments.parse().with_context(|| { - format!("Tool call '{function_name}' have non-JSON arguments '{function_arguments}'") + format!("Tool call '{function_name}' has non-JSON arguments '{function_arguments}'") })?; handler.tool_call(ToolCall::new( function_name.clone(), diff --git a/src/client/claude.rs b/src/client/claude.rs index 60e1f5f..5488a85 100644 --- a/src/client/claude.rs +++ b/src/client/claude.rs @@ -95,7 +95,7 @@ pub async fn claude_chat_completions_streaming( if !function_name.is_empty() { let arguments: Value = function_arguments.parse().with_context(|| { - format!("Tool call '{function_name}' have non-JSON arguments '{function_arguments}'") + format!("Tool call '{function_name}' has non-JSON arguments '{function_arguments}'") })?; handler.tool_call(ToolCall::new( function_name.clone(), @@ -134,7 +134,7 @@ pub async fn claude_chat_completions_streaming( json!({}) } else { function_arguments.parse().with_context(|| { - format!("Tool call '{function_name}' have non-JSON arguments '{function_arguments}'") + format!("Tool call '{function_name}' has non-JSON arguments '{function_arguments}'") })? }; handler.tool_call(ToolCall::new( diff --git a/src/client/cohere.rs b/src/client/cohere.rs index b395915..d132714 100644 --- a/src/client/cohere.rs +++ b/src/client/cohere.rs @@ -167,7 +167,7 @@ async fn chat_completions_streaming( "tool-call-end" => { if !function_name.is_empty() { let arguments: Value = function_arguments.parse().with_context(|| { - format!("Tool call '{function_name}' have non-JSON arguments '{function_arguments}'") + format!("Tool call '{function_name}' has non-JSON arguments '{function_arguments}'") })?; handler.tool_call(ToolCall::new( function_name.clone(), @@ -230,7 +230,7 @@ fn extract_chat_completions(data: &Value) -> Result { call["id"].as_str(), ) { let arguments: Value = arguments.parse().with_context(|| { - format!("Tool call '{name}' have non-JSON arguments '{arguments}'") + format!("Tool call '{name}' has non-JSON arguments '{arguments}'") })?; tool_calls.push(ToolCall::new( name.to_string(), diff --git a/src/client/openai.rs b/src/client/openai.rs index f1dc2e0..506f593 100644 --- a/src/client/openai.rs +++ b/src/client/openai.rs @@ -164,7 +164,7 @@ pub async fn openai_chat_completions_streaming( function_arguments = String::from("{}"); } let arguments: Value = function_arguments.parse().with_context(|| { - format!("Tool call '{function_name}' have non-JSON arguments '{function_arguments}'") + format!("Tool call '{function_name}' has non-JSON arguments '{function_arguments}'") })?; handler.tool_call(ToolCall::new( function_name.clone(), @@ -370,7 +370,7 @@ pub fn openai_extract_chat_completions(data: &Value) -> Result Result<()> { self.tool_calls.push(call); + Ok(()) }