Perplexica
Perplexica copied to clipboard
API interaction - Consistent errors when requesting via flask app.
Describe the bug Getting back "sorry I could not find any relevant information on this topic" as the API response - but seeing the following failures in the server logs
perplexica-backend-1 | error: Error at generating documents from links: Invalid URL
perplexica-backend-1 | error: Error at generating documents from links: getaddrinfo ENOTFOUND not_needed
perplexica-backend-1 | error: Error at generating documents from links: getaddrinfo ENOTFOUND el-camino
perplexica-backend-1 | error: Error at generating documents from links: getaddrinfo ENOTFOUND el-camino
perplexica-backend-1 | error: Error at generating documents from links: getaddrinfo ENOTFOUND memorialcare
What's weird is el camino and memorialcare are the subjects of my queries
To Reproduce
I have a flask app that is trying to harvest these results from the API endpoint.
Here is how I have configure my headers and outreach:
url = "http://docker.mydomain.net:3001/api/search" headers = {"Content-Type": "application/json", "Host": "docker.mydomain.net:3001"} # added host header data = { "focusMode": "webSearch", "query": f"Please search for the linked in URL of the current {role} at {organization} - Please provide only the Linkedin address and no additional text." }
What's really weird is when i run the same query via CURL it works just fine.... So it's likely something i am screwing up on the headers coming inbound - happy to troubleshoot - but would need to turn up the debugging to see what is happening - anybody able to provide advice on how to do that? Also happy to take feedback on any changes to the structure of my request.
Thanks, -Dan