Fix typo
This commit is contained in:
parent
de33dad47e
commit
f6122d7091
|
@ -1,9 +1,8 @@
|
|||
import time
|
||||
from fastapi import APIRouter, HTTPException, Depends
|
||||
from typing import Dict, Any
|
||||
from fastapi import APIRouter, HTTPException
|
||||
|
||||
from src.models.lead import LeadInput
|
||||
from src.models.email import EmailResponse, ErrorResponse
|
||||
from src.models.email import EmailResponse
|
||||
from src.graph.build_graph import email_generation_graph
|
||||
from src.app.config import settings
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from langgraph.graph import StateGraph, END
|
||||
from typing import Dict, Any
|
||||
|
||||
from src.graph.state import EmailGenerationState
|
||||
from src.graph.nodes.input_validation import input_validation_node
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
from typing import Dict, Any
|
||||
from src.graph.state import EmailGenerationState
|
||||
from src.models.lead import LeadInput, LeadModel
|
||||
from src.models.errors import ValidationError
|
||||
|
|
|
@ -19,7 +19,7 @@ def parse_output_node(state: EmailGenerationState) -> EmailGenerationState:
|
|||
|
||||
try:
|
||||
parsed_data = json.loads(content)
|
||||
except json.JSONDecodeError as e:
|
||||
except json.JSONDecodeError:
|
||||
parsed_data = _fallback_parse(content)
|
||||
|
||||
if not isinstance(parsed_data, dict):
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import re
|
||||
import tiktoken
|
||||
from typing import List, Dict, Any
|
||||
from typing import List
|
||||
from dataclasses import dataclass
|
||||
|
||||
from src.ingest.loader import Document
|
||||
|
|
|
@ -2,7 +2,7 @@ import os
|
|||
import sys
|
||||
import argparse
|
||||
import hashlib
|
||||
from typing import List, Dict, Any
|
||||
from typing import Dict, Any
|
||||
|
||||
sys.path.append(
|
||||
os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
|
@ -31,7 +31,7 @@ def run_ingest(
|
|||
embedding_model: str = None,
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
print(f"Starting ingestion process...")
|
||||
print("Starting ingestion process...")
|
||||
print(f"Data directory: {data_dir}")
|
||||
print(f"Persist directory: {persist_dir or settings.chroma_persist_dir}")
|
||||
print(f"Recreate: {recreate}")
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
from abc import ABC, abstractmethod
|
||||
from typing import List, Dict, Any, Optional, Tuple
|
||||
from src.models.email import LLMRawOutput
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import google.generativeai as genai
|
||||
import tiktoken
|
||||
from typing import Dict, Any
|
||||
|
||||
from src.llm_clients.base import LLMClient
|
||||
from src.models.email import LLMRawOutput
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import openai
|
||||
import tiktoken
|
||||
from typing import Dict, Any
|
||||
|
||||
from src.llm_clients.base import LLMClient
|
||||
from src.models.email import LLMRawOutput
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from typing import List, Union
|
||||
from typing import List
|
||||
from abc import ABC, abstractmethod
|
||||
import openai
|
||||
import google.generativeai as genai
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
from typing import Dict, Any
|
||||
from src.models.lead import LeadModel
|
||||
from src.models.email import RankedContext
|
||||
from src.app.config import settings
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
from typing import List, Dict, Any, Optional
|
||||
from typing import List, Optional
|
||||
import tiktoken
|
||||
import hashlib
|
||||
import time
|
||||
|
||||
from src.models.email import DocChunk, RetrievalQuery, RankedContext
|
||||
from src.models.lead import LeadModel, LeadFeatures
|
||||
from src.models.lead import LeadFeatures
|
||||
from src.services.chroma_store import ChromaStore
|
||||
from src.services.embeddings import EmbeddingService
|
||||
from src.app.config import settings
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import pytest
|
||||
import json
|
||||
from fastapi.testclient import TestClient
|
||||
import sys
|
||||
import os
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import pytest
|
||||
import tempfile
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
|
@ -140,7 +138,6 @@ class TestDocumentChunker:
|
|||
|
||||
class TestLeadModelExtraction:
|
||||
def test_role_category_extraction(self):
|
||||
from src.models.lead import LeadModel
|
||||
|
||||
assert LeadModel._extract_role_category("Технический директор") == "tech"
|
||||
assert LeadModel._extract_role_category("Финансовый директор") == "finance"
|
||||
|
@ -148,7 +145,6 @@ class TestLeadModelExtraction:
|
|||
assert LeadModel._extract_role_category("HR менеджер") == "hr"
|
||||
|
||||
def test_industry_tag_extraction(self):
|
||||
from src.models.lead import LeadModel
|
||||
|
||||
assert (
|
||||
LeadModel._extract_industry_tag("маркетинговое агентство")
|
||||
|
|
Loading…
Reference in New Issue