自然語言查詢。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
eventbridge:AskLuma |
get |
*All Resource
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| 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": "{}"
}
}
],
"Reasoning": ""
}
]
},
"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 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。