需求未定稿时可先跑通追问/判定/出方案;槽位与判定树外置 YAML,后续可接 Ragflow。 Co-authored-by: haijd <haijd@163.com>
23 lines
648 B
Python
23 lines
648 B
Python
from pathlib import Path
|
|
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
KNOWLEDGE_DIR = ROOT / "knowledge"
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", extra="ignore")
|
|
|
|
app_name: str = "鲜境方案引擎原型"
|
|
knowledge_dir: Path = KNOWLEDGE_DIR
|
|
retrieval_backend: str = "mock" # mock | ragflow
|
|
ragflow_base_url: str = "http://127.0.0.1:9380"
|
|
ragflow_api_key: str = ""
|
|
ragflow_dataset_ids: str = ""
|
|
llm_mode: str = "template" # template(无 Key 可跑)| openai_compatible(预留)
|
|
|
|
|
|
settings = Settings()
|