Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API interaction - Consistent errors when requesting via flask app. #521

Open
dblinick opened this issue Dec 14, 2024 · 3 comments
Open

API interaction - Consistent errors when requesting via flask app. #521

dblinick opened this issue Dec 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@dblinick
Copy link

dblinick commented Dec 14, 2024

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

@dblinick dblinick added the bug Something isn't working label Dec 14, 2024
@ItzCrazyKns
Copy link
Owner

What model are you using?

@dblinick
Copy link
Author

image

I have specified these in the API call - is that something that needs to happen (API documentation labeled these as optional - also my CURL testing haven't and still work just fine.

@ItzCrazyKns
Copy link
Owner

image

I have specified these in the API call - is that something that needs to happen (API documentation labeled these as optional - also my CURL testing haven't and still work just fine.

Seems like its calling random links for summarization or question answering. Can you share the prompt so I can replicate the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants