Hi,
I’ve created a GPT to search a dataset we host on Algolia. I’ve created an openapi spec and an instruction set. At first I was having issues getting it to pass on certain headers, such as X-Algolia-Application-Id so I decided to route the API requests via a proxy. This allows me to override or add certain headers, and is also useful in that I can log the requests to see what’s going on.
Using GET requests appears to work, but I noticed the GPT was often including a params array in the body when attempting to filter results. This is only supported in POST requests to Algolia, and so I’d like to get these working.
I can see params being set in the debug info, but these don’t appear in my proxy logs. The content of the request appears empty.
[debug] Calling HTTP endpoint information
{
"domain": "[PROXY_DOMAIN]",
"method": "post",
"path": "/",
"operation": "search",
"operation_hash": "[OPERATION_HASH]",
"is_consequential": true,
"params": {
"query": "",
"hitsPerPage": 5,
"attributesToRetrieve": [
"name",
"location",
"languages"
],
"attributesToHighlight": [],
"facetFilters": []
}
}
Here’s the log in my proxy:
2023-11-29 13:29:03 - Received Request:
Method: POST
Headers: {"Host":"[PROXY_DOMAIN]","content-type":"application\/json","user-agent":"Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko); compatible; ChatGPT-User\/1.0; +https:\/\/openai.com\/bot","openai-ephemeral-user-id":"[REMOVED]","openai-conversation-id":"[REMOVED]","openai-gpt-id":"[REMOVED]","x-algolia-api-key":"[REMOVED]","x-datadog-trace-id":"[REMOVED]","x-datadog-parent-id":"[REMOVED]","x-datadog-sampling-priority":"0","traceparent":"[REMOVED]","tracestate":"dd=s:0","Accept":"*\/*","Accept-Encoding":"gzip, deflate","Content-Length":2,"X-Algolia-Application-Id":"[REMOVED]"}
Content: {}
So my questions are…
- Why are the params not being sent in the body content of the POST request?
- Is there any way to get further debug information on the API request being sent?
Thanks,
Paul