文档管理中心
我的

清理上下文

Agent Client发送清理上下文请求给Agent Server:

curl 'https://xxx/agent/message' \
-H 'Content-Type: application/json’ \
-H 'agent-session-id:8f01f3d172cd4396a0e535ae8aec6687 ’\
-d '{
    "jsonrpc": "2.0",
    "id": "{{与agent-server通信的全局唯一消息序列号,字符串表示}}",
    "sessionId": "{{Agent Client侧分配的会话唯一标识符}}",
    "method": "clearContext"
}'

Agent Client获取Agent Server清理上下文的处理响应:

{
    "jsonrpc": "2.0",
    "id": "{{与agent-server通信的全局唯一消息序列号,从请求中取出该字段返回}}",
    "result": {
        "status": {
            "state": "{{任务状态,取值为[cleared|failed|unknown]其中之一}}"
          }
    },
    "error": {
        "code": "{{JSONRPCError错误码, 整形或字符串类型,0表示成功}}",
        "message": "{{JSONRPCError错误描述}}"
    }
}