【MR类型】 feat: 将北向 query 下沉为 operation,便于后续扩展
【问题背景】 REST 现在只有 POST /api/agent/query。后续还要挂 update(在线改提示词)等操作,需要先把 query 收成一种 operation,但本期不能动输出,也不能改限流/证书。
POST /api/agent/query
update
【具体方案】
operation
"query"
query
stream
literal_error
{query, stream}
请求体示例:
{"operation": "query", "query": "上个月销量最高的产品", "stream": false}
旧客户端:
{"query": "上个月销量最高的产品", "stream": false}
【主要文件】
dataagent/interface/rest_api/app.py
tests/ut/interface/test_rest_api_app.py
【Test plan】
tests/ut/interface/test_rest_api_limits.py
tests/ut/interface/test_rest_api_request_lifecycle.py
{query}
operation: query
operation: update
【MR类型】
feat: 将北向 query 下沉为 operation,便于后续扩展
【问题背景】
REST 现在只有
POST /api/agent/query。后续还要挂update(在线改提示词)等操作,需要先把 query 收成一种 operation,但本期不能动输出,也不能改限流/证书。【具体方案】
POST /api/agent/queryoperation,缺省"query",只允许"query"query/stream原位不动,不套 paramsliteral_error),不默默当 query{query, stream}仍可用请求体示例:
{"operation": "query", "query": "上个月销量最高的产品", "stream": false}旧客户端:
{"query": "上个月销量最高的产品", "stream": false}【主要文件】
dataagent/interface/rest_api/app.pytests/ut/interface/test_rest_api_app.py【Test plan】