Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -3,13 +3,51 @@ from typing import Optional
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
# DashScope API
|
||||
dashscope_api_key: str = ""
|
||||
# Qwen API配置
|
||||
qwen_api_key: str = ""
|
||||
qwen_base_url: str = "https://dashscope.aliyuncs.com/api/v1"
|
||||
qwen_model: str = "qwen-max"
|
||||
qwen_vl_model: str = "qwen-vl-plus"
|
||||
|
||||
# DeepSeek API配置
|
||||
deepseek_api_key: str = ""
|
||||
deepseek_base_url: str = "https://api.deepseek.com/v1"
|
||||
deepseek_model: str = "deepseek-v3"
|
||||
|
||||
# PostgreSQL
|
||||
postgres_host: str = "localhost"
|
||||
postgres_port: int = 5432
|
||||
postgres_user: str = "postgresql"
|
||||
postgres_password: str = "postgresql123456"
|
||||
postgres_db: str = "mydb"
|
||||
|
||||
# Redis
|
||||
redis_host: str = "localhost"
|
||||
redis_port: int = 6379
|
||||
redis_password: str = ""
|
||||
|
||||
# MinIO
|
||||
minio_endpoint: str = "localhost:9000"
|
||||
minio_access_key: str = "minioadmin"
|
||||
minio_secret_key: str = "minioadmin"
|
||||
minio_bucket: str = "regulation-docs"
|
||||
minio_secure: bool = False
|
||||
|
||||
# Milvus
|
||||
milvus_host: str = "localhost"
|
||||
milvus_port: int = 19530
|
||||
|
||||
# Neo4j
|
||||
neo4j_uri: str = "bolt://localhost:7687"
|
||||
neo4j_user: str = "neo4j"
|
||||
neo4j_password: str = "neo4j123"
|
||||
|
||||
# RabbitMQ
|
||||
rabbitmq_host: str = "localhost"
|
||||
rabbitmq_port: int = 5672
|
||||
rabbitmq_user: str = "admin"
|
||||
rabbitmq_password: str = "admin@123"
|
||||
|
||||
# LLM配置
|
||||
llm_model: str = "qwen-max"
|
||||
embedding_model: str = "text-embedding-v3"
|
||||
@@ -32,6 +70,10 @@ class Settings(BaseSettings):
|
||||
regulations_collection: str = "vehicle_regulations"
|
||||
compliance_collection: str = "compliance_cache"
|
||||
|
||||
# 数据目录
|
||||
data_raw_dir: str = "/airegulation/demo-mao/backend/data/raw"
|
||||
data_parsed_dir: str = "/airegulation/demo-mao/backend/data/parsed"
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
|
||||
Reference in New Issue
Block a user