diff options
| author | sigoden <sigoden@gmail.com> | 2024-05-23 19:28:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-23 19:28:56 +0800 |
| commit | 5458150ed3203cf13b0371efa2c791ac696cee93 (patch) | |
| tree | 702d17039d9677246a3b91deb8243e09cd768402 /src/client/replicate.rs | |
| parent | 2ccbb0f06a4558e15642feb53ba7b2bd72804820 (diff) | |
| download | aichat-5458150ed3203cf13b0371efa2c791ac696cee93.tar.gz | |
fix: json stream parser and refine client modules (#538)
Diffstat (limited to 'src/client/replicate.rs')
| -rw-r--r-- | src/client/replicate.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/replicate.rs b/src/client/replicate.rs index c549ae8..c39cb07 100644 --- a/src/client/replicate.rs +++ b/src/client/replicate.rs @@ -1,7 +1,7 @@ use super::{ - catch_error, prompt_format::*, sse_stream, Client, CompletionOutput, ExtraConfig, - Model, ModelData, ModelPatches, PromptAction, PromptKind, ReplicateClient, SendData, - SsMmessage, SseHandler, + catch_error, prompt_format::*, sse_stream, Client, CompletionOutput, ExtraConfig, Model, + ModelData, ModelPatches, PromptAction, PromptKind, ReplicateClient, SendData, SseHandler, + SseMmessage, }; use anyhow::{anyhow, Result}; @@ -125,7 +125,7 @@ async fn send_message_streaming( let sse_builder = client.get(stream_url).header("accept", "text/event-stream"); - let handle = |message: SsMmessage| -> Result<bool> { + let handle = |message: SseMmessage| -> Result<bool> { if message.event == "done" { return Ok(true); } |
