多轮 ReAct Agent · 联网搜索 · 网页精读 · LLM 合成

诺贝尔奖 量子计算 AI 进展 经济数据
就绪,等待输入问题
研究结果
开发者接口文档 (API Reference)

基础信息

所有接口基于 http://localhost:8800,支持 CORS 跨域访问。

GET /api/health

健康检查,返回服务状态和配置信息。

curl http://localhost:8800/api/health

POST /api/research

同步深度研究 — 提交问题,等待完整结果返回。

curl -X POST http://localhost:8800/api/research \
  -H "Content-Type: application/json" \
  -d '{"question":"2024年诺贝尔物理学奖得主是谁?"}'

返回 JSON:{"question","answer","success","turns","tokens_used","time_seconds"}

POST /api/research/stream

流式研究 — SSE (Server-Sent Events) 实时推送搜索进度。

// JavaScript SSE
const response = await fetch('/api/research/stream', {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({question: "你的问题"})
});
const reader = response.body.getReader();
// ... read stream

Python 调用示例

import requests

resp = requests.post(
    "http://localhost:8800/api/research",
    json={"question": "量子计算的最新进展"}
)
result = resp.json()
print(result["answer"])

Node.js 调用示例

fetch("http://localhost:8800/api/research", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ question: "OpenAI latest news" })
}).then(r => r.json()).then(console.log)