summaryrefslogtreecommitdiffstats
path: root/src/config/input.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-06-17 09:14:54 +0800
committerGitHub <noreply@github.com>2024-06-17 09:14:54 +0800
commit638bf3276613265da761b4d74f269fa77c8f4bb1 (patch)
tree9667711b92bc3664ad72c179cfe1cf4bbf54d322 /src/config/input.rs
parent12872b3d2956a26fb7d1cd464b3672ebe40d94c1 (diff)
downloadaichat-638bf3276613265da761b4d74f269fa77c8f4bb1.tar.gz
refactor: improve code quatity (#604)
Diffstat (limited to 'src/config/input.rs')
-rw-r--r--src/config/input.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/config/input.rs b/src/config/input.rs
index 0c93c1f..48b0359 100644
--- a/src/config/input.rs
+++ b/src/config/input.rs
@@ -4,7 +4,7 @@ use crate::client::{
init_client, ChatCompletionsData, Client, ImageUrl, Message, MessageContent,
MessageContentPart, MessageRole, Model,
};
-use crate::function::{ToolCallResult, ToolResults};
+use crate::function::{ToolResult, ToolResults};
use crate::utils::{base64_encode, sha256, AbortSignal};
use anyhow::{bail, Context, Result};
@@ -154,11 +154,7 @@ impl Input {
self.patched_text.take();
}
- pub fn merge_tool_call(
- mut self,
- output: String,
- tool_call_results: Vec<ToolCallResult>,
- ) -> Self {
+ pub fn merge_tool_call(mut self, output: String, tool_call_results: Vec<ToolResult>) -> Self {
match self.tool_call.as_mut() {
Some(exist_tool_call_results) => {
exist_tool_call_results.0.extend(tool_call_results);