diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-22 14:07:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-22 14:07:58 +0800 |
| commit | 0ec370b48c951a69459f9232b56df882765ccb52 (patch) | |
| tree | c12bab3bd72acc97adcd835b8d5aea82d1b96cd3 /src/config/input.rs | |
| parent | 250e0eb7fee0d180b08b7d38d10c530e9a6a120d (diff) | |
| download | aichat-0ec370b48c951a69459f9232b56df882765ccb52.tar.gz | |
refactor: improve clients (#632)
Diffstat (limited to 'src/config/input.rs')
| -rw-r--r-- | src/config/input.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/config/input.rs b/src/config/input.rs index b0b0bd9..3a258b9 100644 --- a/src/config/input.rs +++ b/src/config/input.rs @@ -209,13 +209,13 @@ impl Input { self.rag_name.as_deref() } - pub fn merge_tool_call(mut self, output: String, tool_call_results: Vec<ToolResult>) -> Self { + pub fn merge_tool_call(mut self, output: String, tool_results: Vec<ToolResult>) -> Self { match self.tool_call.as_mut() { - Some(exist_tool_call_results) => { - exist_tool_call_results.0.extend(tool_call_results); - exist_tool_call_results.1 = output; + Some(exist_tool_results) => { + exist_tool_results.0.extend(tool_results); + exist_tool_results.1 = output; } - None => self.tool_call = Some((tool_call_results, output)), + None => self.tool_call = Some((tool_results, output)), } self } |
