feat: add Docker Compose configuration for MongoDB, Redis, FastAPI, Chat, Worker, Flower, and Frontend services; include health checks and volume management
Some checks failed
CI/CD Pipeline / Lint Code (push) Failing after 7m34s
CI/CD Pipeline / Run Tests (push) Has been skipped
CI/CD Pipeline / Security Scanning (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (api) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (chat) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (frontend) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (worker) (push) Has been skipped
CI/CD Pipeline / Deploy to Staging (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
CI/CD Pipeline / Generate Documentation (push) Failing after 7m59s
Some checks failed
CI/CD Pipeline / Lint Code (push) Failing after 7m34s
CI/CD Pipeline / Run Tests (push) Has been skipped
CI/CD Pipeline / Security Scanning (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (api) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (chat) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (frontend) (push) Has been skipped
CI/CD Pipeline / Build and Push Docker Images (worker) (push) Has been skipped
CI/CD Pipeline / Deploy to Staging (push) Has been skipped
CI/CD Pipeline / Deploy to Production (push) Has been skipped
CI/CD Pipeline / Generate Documentation (push) Failing after 7m59s
This commit is contained in:
@@ -177,16 +177,21 @@ class DocumentationAgent:
|
||||
# Format results
|
||||
formatted_results = []
|
||||
for doc, score in results:
|
||||
# ChromaDB returns distance scores (lower is better)
|
||||
# Normalize to similarity score (0-1, higher is better)
|
||||
# Using 1/(1+distance) ensures values are always between 0 and 1
|
||||
relevance_score = 1.0 / (1.0 + score)
|
||||
|
||||
formatted_results.append(
|
||||
{
|
||||
"content": doc.page_content,
|
||||
"section": doc.metadata.get("section", "unknown"),
|
||||
"source": doc.metadata.get("source", ""),
|
||||
"relevance_score": float(1 - score), # Convert distance to similarity
|
||||
"relevance_score": float(relevance_score),
|
||||
"last_updated": doc.metadata.get("indexed_at", ""),
|
||||
}
|
||||
)
|
||||
logger.info(f" ✓ Section: {doc.metadata.get('section')} (relevance: {(1-score)*100:.1f}%)")
|
||||
logger.info(f" ✓ Section: {doc.metadata.get('section')} (relevance: {relevance_score*100:.1f}%, distance: {score:.3f})")
|
||||
|
||||
return formatted_results
|
||||
|
||||
|
||||
Reference in New Issue
Block a user