This commit is contained in:
2026-05-14 15:07:34 +08:00
parent c2a398930d
commit 10d04c4083
179 changed files with 24073 additions and 1243 deletions

View File

@@ -0,0 +1,3 @@
from .config import settings, Settings
__all__ = ["settings", "Settings"]

View File

@@ -0,0 +1,41 @@
from pydantic_settings import BaseSettings
from typing import Optional
class Settings(BaseSettings):
# DashScope API
dashscope_api_key: str = ""
# Milvus
milvus_host: str = "localhost"
milvus_port: int = 19530
# LLM配置
llm_model: str = "qwen-max"
embedding_model: str = "text-embedding-v3"
embedding_dim: int = 1536
# 检索配置
vector_top_k: int = 10
bm25_top_k: int = 10
final_top_k: int = 5
# 分块配置
chunk_size: int = 800
chunk_overlap: int = 50
# 服务配置
api_host: str = "0.0.0.0"
api_port: int = 8000
# Collection名称
regulations_collection: str = "vehicle_regulations"
compliance_collection: str = "compliance_cache"
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
case_sensitive = False
settings = Settings()