diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-17 09:14:54 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-17 09:14:54 +0800 |
| commit | 638bf3276613265da761b4d74f269fa77c8f4bb1 (patch) | |
| tree | 9667711b92bc3664ad72c179cfe1cf4bbf54d322 /src/client/common.rs | |
| parent | 12872b3d2956a26fb7d1cd464b3672ebe40d94c1 (diff) | |
| download | aichat-638bf3276613265da761b4d74f269fa77c8f4bb1.tar.gz | |
refactor: improve code quatity (#604)
Diffstat (limited to 'src/client/common.rs')
| -rw-r--r-- | src/client/common.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/common.rs b/src/client/common.rs index 4ff476b..bc84fe8 100644 --- a/src/client/common.rs +++ b/src/client/common.rs @@ -2,7 +2,7 @@ use super::*; use crate::{ config::{GlobalConfig, Input}, - function::{eval_tool_calls, FunctionDeclaration, ToolCall, ToolCallResult}, + function::{eval_tool_calls, FunctionDeclaration, ToolCall, ToolResult}, render::{render_error, render_stream}, utils::{ prompt_input_integer, prompt_input_string, tokenize, watch_abort_signal, AbortSignal, @@ -505,12 +505,12 @@ pub fn create_openai_compatible_client_config(client: &str) -> Result<Option<(St } } -pub async fn send_stream( +pub async fn chat_completion_streaming( input: &Input, client: &dyn Client, config: &GlobalConfig, abort: AbortSignal, -) -> Result<(String, Vec<ToolCallResult>)> { +) -> Result<(String, Vec<ToolResult>)> { let (tx, rx) = unbounded_channel(); let mut handler = SseHandler::new(tx, abort.clone()); |
