52 lines
1.5 KiB
Python
52 lines
1.5 KiB
Python
from functools import lru_cache
|
|
from pathlib import Path
|
|
|
|
from pydantic import Field
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
BASE_DIR = Path(__file__).resolve().parents[2]
|
|
ROOT_DIR = BASE_DIR.parents[1]
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
|
|
|
app_name: str = "Gig POC API"
|
|
app_env: str = "development"
|
|
app_host: str = "0.0.0.0"
|
|
app_port: int = 8000
|
|
log_level: str = "INFO"
|
|
|
|
database_url: str = "postgresql+psycopg://gig:gig@postgres:5432/gig_poc"
|
|
qdrant_url: str = "http://qdrant:6333"
|
|
qdrant_collection: str = "gig_poc_entities"
|
|
vector_size: int = 64
|
|
|
|
llm_enabled: bool = False
|
|
llm_base_url: str | None = None
|
|
llm_api_key: str | None = None
|
|
llm_model: str = "gpt-5.4"
|
|
embedding_enabled: bool = False
|
|
embedding_model: str = "text-embedding-3-small"
|
|
|
|
bootstrap_jobs: int = 100
|
|
bootstrap_workers: int = 300
|
|
default_recall_top_k: int = 30
|
|
default_match_top_n: int = 10
|
|
|
|
prompt_dir: Path = Field(default=ROOT_DIR / "packages" / "prompts")
|
|
sample_data_dir: Path = Field(default=ROOT_DIR / "packages" / "sample-data")
|
|
shared_types_dir: Path = Field(default=ROOT_DIR / "packages" / "shared-types")
|
|
|
|
score_skill_weight: float = 0.35
|
|
score_region_weight: float = 0.20
|
|
score_time_weight: float = 0.15
|
|
score_experience_weight: float = 0.15
|
|
score_reliability_weight: float = 0.15
|
|
|
|
|
|
@lru_cache
|
|
def get_settings() -> Settings:
|
|
return Settings()
|