mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-19 07:54:29 +01:00
refactor: separation of json-stream-parser to own crate
This commit is contained in:
@@ -21,6 +21,7 @@ use futures::{
|
||||
stream::{self, once},
|
||||
Stream, StreamExt, TryStreamExt,
|
||||
};
|
||||
use json_stream_parser::JsonStreamParser;
|
||||
use minijinja::Value;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::from_str;
|
||||
@@ -28,17 +29,14 @@ use surrealdb::{engine::any::Any, Surreal};
|
||||
use tokio::sync::{mpsc::channel, Mutex};
|
||||
use tracing::{debug, error};
|
||||
|
||||
use common::{
|
||||
storage::{
|
||||
db::SurrealDbClient,
|
||||
types::{
|
||||
conversation::Conversation,
|
||||
message::{Message, MessageRole},
|
||||
system_settings::SystemSettings,
|
||||
user::User,
|
||||
},
|
||||
use common::storage::{
|
||||
db::SurrealDbClient,
|
||||
types::{
|
||||
conversation::Conversation,
|
||||
message::{Message, MessageRole},
|
||||
system_settings::SystemSettings,
|
||||
user::User,
|
||||
},
|
||||
utils::stream_parser::JsonStreamParser,
|
||||
};
|
||||
|
||||
use crate::html_state::HtmlState;
|
||||
|
||||
@@ -258,7 +258,7 @@ fn get_plot_html(
|
||||
Ok(plot.to_html())
|
||||
}
|
||||
|
||||
// Small utility to unzip tuple3 vectors from iterators (add this helper)
|
||||
// Small utility to unzip tuple3 vectors from iterators
|
||||
trait Unzip3<A, B, C> {
|
||||
fn unzip3(self) -> (Vec<A>, Vec<B>, Vec<C>);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user