应用平台 APPSTAGE-调用Agent:请求示例

时间:2024-12-12 09:25:07

请求示例

{
  "query" : "查询北京天气",
  "quote" : "引用文件名",
  "memory" : [ {
    "role" : "user",
    "content" : "你是谁"
  }, {
    "role" : "assistant",
    "content" : "我是盘古大模型"
  }, {
    "role" : "user",
    "content" : "南京天气"
  }, {
    "role" : "assistant",
    "tool_calls" : [ {
      "id" : "efd6ff92-422c-4ba4-b531-ac1991af7c1a",
      "type" : "function",
      "function" : {
        "name" : "查询当前天气 查询当前天气",
        "arguments" : "{\"city\":\"320100\",\"extensions\":\"all\"}"
      }
    } ]
  }, {
    "role" : "tool",
    "tool_call_id" : "efd6ff92-422c-4ba4-b531-ac1991af7c1a",
    "content" : "{\"data\":{\"status\":\"1\",\"count\":\"1\",\"info\":\"OK\",\"infocode\":\"10000\",\"forecasts\":[{\"city\":\"南京市\",\"adcode\":\"320100\",\"province\":\"江苏\",\"reporttime\":\"2024-08-20 16:32:01\",\"casts\":[{\"date\":\"2024-08-20\",\"week\":\"2\",\"dayweather\":\"中雨\",\"nightweather\":\"中雨\",\"daytemp\":\"32\",\"nighttemp\":\"26\",\"daywind\":\"西北\",\"nightwind\":\"西北\",\"daypower\":\"1-3\",\"nightpower\":\"1-3\",\"daytemp_float\":\"32.0\",\"nighttemp_float\":\"26.0\"}]}]}}"
  } ]
}
support.huaweicloud.com/api-appstage/ExcuteAgent.html