add vector db

This commit is contained in:
2025-08-02 17:19:00 +00:00
parent 187bcc61bd
commit 4b70054e86
9 changed files with 444 additions and 6 deletions

20
app/config.py Normal file
View File

@@ -0,0 +1,20 @@
import os
from pydantic import SecretStr
from pydantic_settings import BaseSettings, SettingsConfigDict
class Config(BaseSettings):
BASE_DIR: str = os.path.abspath(os.path.join(os.path.dirname(__file__)))
DOCS_AMVERA_PATH: str = os.path.join(BASE_DIR, "amvera_data", "docs_amvera")
PARSED_JSON_PATH: str = os.path.join(BASE_DIR, "amvera_data", "parsed_json")
AMVERA_CHROMA_PATH: str = os.path.join(BASE_DIR, "amvera_data", "chroma_db")
AMVERA_COLLECTION_NAME: str = "amvera_docs"
MAX_CHUNK_SIZE: int = 512
CHUNK_OVERLAP: int = 50
LM_MODEL_NAME: str = "/models/paraphrase-multilingual-MiniLM-L12-v2"
LOCAL_LLM_NAME: str = "/models/Qwen3-4B-Base"
QWEN_MODEL_NAME: str = "qwen3-chat"
settings = Config() # type: ignore