Skip to content

Commit d805b4b

Browse files
mjirvMichael Irvine
andauthored
docs(ai-api): fixes runQuery documentation (#9441)
Co-authored-by: Michael Irvine <[email protected]>
1 parent 9ba6618 commit d805b4b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

docs/pages/product/apis-integrations/ai-api.mdx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,16 @@ Use the `runQuery` request parameter to have the AI API run the query and report
107107
}
108108
```
109109

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>
111117

112118
<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
114120
(`\n`). You are responsible for parsing these appropriately.
115121
</InfoBox>
116122

0 commit comments

Comments
 (0)