summaryrefslogtreecommitdiffstats
path: root/src/client/openai.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-05-23 19:28:56 +0800
committerGitHub <noreply@github.com>2024-05-23 19:28:56 +0800
commit5458150ed3203cf13b0371efa2c791ac696cee93 (patch)
tree702d17039d9677246a3b91deb8243e09cd768402 /src/client/openai.rs
parent2ccbb0f06a4558e15642feb53ba7b2bd72804820 (diff)
downloadaichat-5458150ed3203cf13b0371efa2c791ac696cee93.tar.gz
fix: json stream parser and refine client modules (#538)
Diffstat (limited to 'src/client/openai.rs')
-rw-r--r--src/client/openai.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/openai.rs b/src/client/openai.rs
index c8275cc..881365f 100644
--- a/src/client/openai.rs
+++ b/src/client/openai.rs
@@ -1,6 +1,6 @@
use super::{
catch_error, message::*, sse_stream, Client, CompletionOutput, ExtraConfig, Model, ModelData,
- ModelPatches, OpenAIClient, PromptAction, PromptKind, SendData, SsMmessage, SseHandler,
+ ModelPatches, OpenAIClient, PromptAction, PromptKind, SendData, SseHandler, SseMmessage,
ToolCall,
};
@@ -71,7 +71,7 @@ pub async fn openai_send_message_streaming(
let mut function_name = String::new();
let mut function_arguments = String::new();
let mut function_id = String::new();
- let handle = |message: SsMmessage| -> Result<bool> {
+ let handle = |message: SseMmessage| -> Result<bool> {
if message.data == "[DONE]" {
if !function_name.is_empty() {
handler.tool_call(ToolCall::new(