summaryrefslogtreecommitdiffstats
path: root/src/client/stream.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-09-09 18:39:14 +0800
committerGitHub <noreply@github.com>2024-09-09 18:39:14 +0800
commit69965466e6510db730f0eaf2384addecdcc66a84 (patch)
tree891b0169cc6d972da545873b4832d8faacf444f9 /src/client/stream.rs
parenta56d5f2ddfcfb290c308f2b1a3464c3bebc340de (diff)
downloadaichat-69965466e6510db730f0eaf2384addecdcc66a84.tar.gz
feat: proxy chat-completions api with tools support (#850)
Diffstat (limited to 'src/client/stream.rs')
-rw-r--r--src/client/stream.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/stream.rs b/src/client/stream.rs
index 907efee..b6a1b46 100644
--- a/src/client/stream.rs
+++ b/src/client/stream.rs
@@ -65,6 +65,10 @@ impl SseHandler {
self.abort.clone()
}
+ pub fn get_tool_calls(&self) -> &[ToolCall] {
+ &self.tool_calls
+ }
+
pub fn take(self) -> (String, Vec<ToolCall>) {
let Self {
buffer, tool_calls, ..