summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-11-13 18:24:43 +0800
committerGitHub <noreply@github.com>2024-11-13 18:24:43 +0800
commitff0ea19b48a18e9a1849bd2a653173a3ed4e4560 (patch)
treeb8a8b9d15639649f2fa6e7dc72adcfae770bfc4e /src/config
parent163ab626cd2b8875161b2598e9400df201eacaa8 (diff)
downloadaichat-ff0ea19b48a18e9a1849bd2a653173a3ed4e4560.tar.gz
fix: invalid request on qianwen multi tool-calls (#993)
Diffstat (limited to 'src/config')
-rw-r--r--src/config/input.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/config/input.rs b/src/config/input.rs
index 54b2bb0..bc58f32 100644
--- a/src/config/input.rs
+++ b/src/config/input.rs
@@ -186,10 +186,9 @@ impl Input {
pub fn merge_tool_call(mut self, output: String, tool_results: Vec<ToolResult>) -> Self {
match self.tool_call.as_mut() {
Some(exist_tool_results) => {
- exist_tool_results.0.extend(tool_results);
- exist_tool_results.1 = output;
+ exist_tool_results.extend(tool_results, output);
}
- None => self.tool_call = Some((tool_results, output)),
+ None => self.tool_call = Some(ToolResults::new(tool_results, output)),
}
self
}