summaryrefslogtreecommitdiffstats
path: root/src/function.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-11-14 08:14:32 +0800
committerGitHub <noreply@github.com>2024-11-14 08:14:32 +0800
commit80684ec84047bda0299f8fd845b1c97f6fac5c99 (patch)
treef37e377accd664d31a2bfe977521cfc2157a9cd1 /src/function.rs
parentcfa9217422dfa6cf10bed6e6e3fab0722f58588d (diff)
downloadaichat-80684ec84047bda0299f8fd845b1c97f6fac5c99.tar.gz
refactor: improve tool calls (#995)
- rename MessageContent:ToolResults to MessageContent:ToolCalls - rename ToolResults to MessageContentToolCalls - persist tool_calls to messages.md
Diffstat (limited to 'src/function.rs')
-rw-r--r--src/function.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/function.rs b/src/function.rs
index f77467b..e4a7454 100644
--- a/src/function.rs
+++ b/src/function.rs
@@ -266,29 +266,6 @@ impl ToolCall {
}
}
-#[derive(Debug, Clone, Deserialize, Serialize)]
-pub struct ToolResults {
- pub tool_results: Vec<ToolResult>,
- pub text: String,
- pub sequence: bool,
-}
-
-impl ToolResults {
- pub fn new(tool_results: Vec<ToolResult>, text: String) -> Self {
- Self {
- tool_results,
- text,
- sequence: false,
- }
- }
-
- pub fn extend(&mut self, tool_results: Vec<ToolResult>, _text: String) {
- self.tool_results.extend(tool_results);
- self.text.clear();
- self.sequence = true;
- }
-}
-
#[cfg(windows)]
fn polyfill_cmd_name<T: AsRef<Path>>(cmd_name: &str, bin_dir: &[T]) -> String {
let cmd_name = cmd_name.to_string();