diff --git a/src/app/routers/generate.py b/src/app/routers/generate.py index 4520b92..c17cddf 100644 --- a/src/app/routers/generate.py +++ b/src/app/routers/generate.py @@ -1,4 +1,3 @@ -import time from fastapi import APIRouter, HTTPException from src.models.lead import LeadInput @@ -11,8 +10,6 @@ router = APIRouter(prefix="/api/v1", tags=["generation"]) @router.post("/generate_email", response_model=EmailResponse) async def generate_email(lead_data: LeadInput): - start_time = time.time() - try: request = lead_data.model_dump() diff --git a/src/app/routers/health.py b/src/app/routers/health.py index 952918a..a2d4175 100644 --- a/src/app/routers/health.py +++ b/src/app/routers/health.py @@ -13,7 +13,7 @@ async def health_check(): chroma_store = ChromaStore() doc_count = chroma_store.get_count() - embedding_service = EmbeddingService() + EmbeddingService() health_status = { "status": "healthy", diff --git a/src/ingest/chunker.py b/src/ingest/chunker.py index d45af89..30c9079 100644 --- a/src/ingest/chunker.py +++ b/src/ingest/chunker.py @@ -98,13 +98,6 @@ class DocumentChunker: current_section = "" current_title = "Введение" - semantic_markers = [ - ("Проблема", ["проблема", "вызов", "трудност", "сложност"]), - ("Решение", ["решение", "как", "что сделали", "подход"]), - ("Результат", ["результат", "итог", "достижени", "эффект"]), - ("О клиенте", ["о клиенте", "о компании", "клиент"]), - ] - for line in lines: line_stripped = line.strip() diff --git a/src/ingest/loader.py b/src/ingest/loader.py index 1cec84a..22fa248 100644 --- a/src/ingest/loader.py +++ b/src/ingest/loader.py @@ -21,8 +21,6 @@ class MarkdownLoader: with open(file_path, "r", encoding="utf-8") as f: content = f.read() - html_content = self.md.convert(content) - title = self._extract_title(content) doc_id = self._generate_doc_id(file_path) diff --git a/src/tests/test_ingest.py b/src/tests/test_ingest.py index 05db840..becf1cc 100644 --- a/src/tests/test_ingest.py +++ b/src/tests/test_ingest.py @@ -217,5 +217,5 @@ class TestEmbeddingService: with patch("src.app.config.settings") as mock_settings: mock_settings.llm_provider = "openai" - service = EmbeddingService() + EmbeddingService() mock_provider.assert_called_once()