跳转至

快速开始

本页只保留最常用的 CG_RAG 调用 demo。完整字段、响应结构和错误语义见 HTTP APIMCP 工具

示例默认服务地址:

http://127.0.0.1:8864

健康检查

curl --noproxy '*' -sS \
  http://127.0.0.1:8864/cg-rag/health

只返回 retrieve + rerank

curl --noproxy '*' -sS \
  -X POST http://127.0.0.1:8864/cg-rag/retrieve-rerank \
  -H 'Content-Type: application/json' \
  -d '{"query":"脚手架验收需要检查哪些条文?","scope":"full","topk":5}'

完整 RAG

curl --noproxy '*' -sS \
  -X POST http://127.0.0.1:8864/cg-rag/rag \
  -H 'Content-Type: application/json' \
  -d '{"query":"脚手架验收需要检查哪些条文?","scope":"full","topk":20,"max_items":5}'

MCP 客户端配置

{
  "mcpServers": {
    "CG_RAG": {
      "type": "streamable-http",
      "url": "http://127.0.0.1:8864/cg-rag/mcp/"
    }
  }
}