gitbook
gitbook copied to clipboard
"Test it" tool for AI ask is prepopulated with erroneous request body
It appears that all of the AI ask endpoints descriptions on this page show the body as only requiring a query
parameter. However, if you go to run a request via the "Test it" button on that page, the editor loads with the following request body prepopulated:
{
"query": "",
"previousQueries": [
null
]
}
If you fill in your query and run it as-is, without editing the contents of the previousQueries
array, you'll get the following 422 error response:
{
"error": {
"code": 422,
"message": "body.previousQueries.0: expected a string"
}
}
Editing the body to make previousQueries
be an empty array, or deleting previousQueries
entirely causes the request to succeed. Given that previousQueries
is deprecated and appears to no longer be functional, I'd think it should be removed from the "Test it" tool.