mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-21 00:49:54 +01:00
moved entry points to bin to clarify
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -5387,7 +5387,6 @@ dependencies = [
|
||||
"axum",
|
||||
"axum_typed_multipart",
|
||||
"futures",
|
||||
"futures-lite 2.3.0",
|
||||
"lapin",
|
||||
"mime",
|
||||
"mime_guess",
|
||||
|
||||
@@ -8,7 +8,6 @@ async-openai = "0.24.1"
|
||||
axum = { version = "0.7.5", features = ["multipart", "macros"] }
|
||||
axum_typed_multipart = "0.12.1"
|
||||
futures = "0.3.31"
|
||||
futures-lite = "2.3.0"
|
||||
lapin = { version = "2.5.0", features = ["serde_json"] }
|
||||
mime = "0.3.17"
|
||||
mime_guess = "2.0.5"
|
||||
@@ -29,8 +28,8 @@ uuid = { version = "1.10.0", features = ["v4", "serde"] }
|
||||
|
||||
[[bin]]
|
||||
name = "server"
|
||||
path = "src/server.rs"
|
||||
path = "src/bin/server.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "consumer"
|
||||
path = "src/consumer.rs"
|
||||
name = "worker"
|
||||
path = "src/bin/worker.rs"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
use std::time::Instant;
|
||||
|
||||
use text_splitter::TextSplitter;
|
||||
use tracing::{debug, info};
|
||||
|
||||
@@ -35,11 +37,17 @@ impl ContentProcessor {
|
||||
// Store original content
|
||||
store_item(&self.db_client, content.clone()).await?;
|
||||
|
||||
let now = Instant::now();
|
||||
// Process in parallel where possible
|
||||
let (analysis, _similar_chunks) = tokio::try_join!(
|
||||
self.perform_semantic_analysis(content),
|
||||
self.find_similar_content(content),
|
||||
)?;
|
||||
let end = now.elapsed();
|
||||
info!(
|
||||
"{:?} time elapsed during creation of entities and relationships",
|
||||
end
|
||||
);
|
||||
|
||||
// Convert and store entities
|
||||
let (entities, relationships) = analysis
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use futures_lite::stream::StreamExt;
|
||||
use futures::StreamExt;
|
||||
use lapin::{message::Delivery, options::*, types::FieldTable, Channel, Consumer, Queue};
|
||||
|
||||
use crate::{
|
||||
|
||||
Reference in New Issue
Block a user