chore: clean & refactor

This commit is contained in:
Per Stark
2024-11-28 11:25:00 +01:00
parent 1cd26061d7
commit 5c2ab58566
4 changed files with 27 additions and 50 deletions

View File

@@ -37,7 +37,8 @@ impl ContentProcessor {
store_item(&self.db_client, content.clone()).await?;
let now = Instant::now();
// Process in parallel where possible
// Perform analyis, this step also includes retrieval
let analysis = self.perform_semantic_analysis(content).await?;
let end = now.elapsed();
@@ -46,7 +47,7 @@ impl ContentProcessor {
end
);
// Convert and store entities
// Convert analysis to objects
let (entities, relationships) = analysis
.to_database_entities(&content.id, &self.openai_client)
.await?;