AskLuma - 智能体语义查询

更新时间:
复制 MD 格式

自然语言查询

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求参数

名称

类型

必填

描述

示例值

AgentName

string

Agent 名称

demo-luma-agent

Question

string

自然语言问题

帮我统计一下最近的订单数据。

ConversationId

string

会话 ID,对于多轮对话,需要传递

conv_1474xxx32_593b9d08-9

MaxRows

integer

最大返回行数

100

返回参数

名称

类型

描述

示例值

object

Message

string

错误信息(成功时为 null)

Agent with name 'xxx' not found for account 1186xxx

RequestId

string

返回的 RequestId

97FB3BAE-XXXXXX-36435495B7EB

Data AskLumaResult

业务响应体

Code

string

错误码

AgentNotFound

Success

boolean

请求是否成功

true

示例

正常返回示例

JSON格式

{
  "Message": "Agent with name 'xxx' not found for account 1186xxx",
  "RequestId": "97FB3BAE-XXXXXX-36435495B7EB",
  "Data": {
    "MessageId": "msg_xxx",
    "ConversationId": "conv_xxx",
    "Status": "RUNNING, SUCCEEDED, FAILED, TIMEOUT",
    "Content": {
      "TextAttachments": [
        "\"**top 5 城市**: 北京(120)...\""
      ],
      "QueryAttachments": [
        {
          "Query": "\"SELECT city, COUNT(*) AS cnt FROM events GROUP BY city\"",
          "Result": {
            "Schema": [
              {
                "Name": "name",
                "Type": "VARCHAR"
              }
            ],
            "Rows": "[[\"北京\",120],[\"上海\",98]] ",
            "RowCount": 2,
            "TotalRows": 2,
            "IsTruncated": false
          }
        }
      ],
      "MessageAttachments": [
        {
          "Id": "msg_123456_a1b2c3d4",
          "Role": "assistant",
          "Content": "根据您的问题,我将查询过去7天的事件量...",
          "Metadata": {
            "Attachments": {
              "Name": "acs:eventbridge:cn-hangzhou:12345:eventhouse/system-rocketmq/namespace/rmq-cn-xxx/table/order",
              "Type": "inner-resource/event-table"
            }
          },
          "ToolCallId": "call_xxx",
          "ToolCalls": [
            {
              "Id": "call_xxx",
              "Type": "function",
              "Function": {
                "Name": "discoverMetadata",
                "Arguments": "{}"
              }
            }
          ]
        }
      ]
    },
    "IsError": false,
    "ErrorCode": "ExecutionFailed, Timeout, RateLimited, InternalError, ConversationExpired",
    "ErrorMessage": "Agent with name 'xxx' not found for account 1186xxx",
    "StorageTruncated": true,
    "ClarificationNeeded": false,
    "ClarificationQuestion": "您指的是哪个数据库中的员工表?",
    "Constraints": {
      "BeginTime": 1717200000000,
      "EndTime": 1717200000000
    }
  },
  "Code": "AgentNotFound",
  "Success": true
}

错误码

HTTP status code

错误码

错误信息

描述

403 ServiceNotEnable Service not enable

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情