diff options
| author | sigoden <sigoden@gmail.com> | 2024-11-13 18:24:43 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-13 18:24:43 +0800 |
| commit | ff0ea19b48a18e9a1849bd2a653173a3ed4e4560 (patch) | |
| tree | b8a8b9d15639649f2fa6e7dc72adcfae770bfc4e /src/config | |
| parent | 163ab626cd2b8875161b2598e9400df201eacaa8 (diff) | |
| download | aichat-ff0ea19b48a18e9a1849bd2a653173a3ed4e4560.tar.gz | |
fix: invalid request on qianwen multi tool-calls (#993)
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/input.rs | 5 |
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 } |
