feat: 可配置方案引擎通用原型(Mock 检索)

需求未定稿时可先跑通追问/判定/出方案;槽位与判定树外置 YAML,后续可接 Ragflow。

Co-authored-by: haijd <haijd@163.com>
This commit is contained in:
Cursor Agent
2026-09-18 09:12:18 +00:00
co-authored by haijd
parent 93b0867eb3
commit 9c6afcb61a
24 changed files with 978 additions and 24 deletions
+22
View File
@@ -0,0 +1,22 @@
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()