You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pages/product/apis-integrations/ai-api.mdx
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,10 +107,16 @@ Use the `runQuery` request parameter to have the AI API run the query and report
107
107
}
108
108
```
109
109
110
-
The response will be the same as above, followed by a second JSON object representing the response (see the [REST API reference](/product/apis-integrations/rest-api/reference#v1load) for its format).
110
+
The response will be the same as above, possibly followed by a second JSON object representing the response (see the [REST API reference](/product/apis-integrations/rest-api/reference#v1load) for its format).
111
+
112
+
<WarningBox>
113
+
In some cases, the AI API will not generate a query, i.e. there will be no `cube_query` key in the first JSON object.
114
+
When that happens, there will be no second object generated, as there are no results to show. This is expected and may
115
+
occur when the model needs more information or doesn't have the necessary fields to run the requested query.
116
+
</WarningBox>
111
117
112
118
<InfoBox>
113
-
Note that the response now contains two JSON objects separated by a newline
119
+
Note that if the AI API generated a query, the response now contains two JSON objects separated by a newline
114
120
(`\n`). You are responsible for parsing these appropriately.
0 commit comments