chore: mini-openclaw 初始版本

Next.js 前端 + FastAPI/LangChain 后端透明 agent平台
- 含 .gitignore, 敏感文件(sessions数据/.env/venv等)已排除
- 待后续添加 trajectory 自进化机制
This commit is contained in:
NathanAlex7
2026-09-01 16:40:10 +08:00
committed by NathanAlex7
parent 73796a6abd
commit 42ce992a0f
76 changed files with 14207 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
"""GET/PUT /api/config/rag-mode — RAG mode toggle API."""
from fastapi import APIRouter
from pydantic import BaseModel
from config import get_rag_mode, set_rag_mode
router = APIRouter()
class RagModeRequest(BaseModel):
enabled: bool
@router.get("/config/rag-mode")
async def get_rag_mode_endpoint():
return {"rag_mode": get_rag_mode()}
@router.put("/config/rag-mode")
async def set_rag_mode_endpoint(request: RagModeRequest):
set_rag_mode(request.enabled)
return {"rag_mode": request.enabled}