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

Timeout should be configurable #26

Open
nesretep-anp1 opened this issue Jan 9, 2025 · 4 comments
Open

Timeout should be configurable #26

nesretep-anp1 opened this issue Jan 9, 2025 · 4 comments

Comments

@nesretep-anp1
Copy link

In an evaluation env we do have only CPU based models running which leads certainly to long response times.

In many cases baibot failes due to timeout.

@spantaleev
Copy link
Contributor

What kind of timeout error are you hitting and with which provider?

I've taken a quick look at the major providers we have (openai, openai-compatible and anthropic) and it seems like:

  • we don't specify a timeout anywhere
  • all these providers use the reqwest library under the hood with a default configuration (no timeouts)

So.. maybe you're hitting some other timeout somewhere else. More information is needed.

@nesretep-anp1
Copy link
Author

That's interesting.

Having requests in the mentioned env last longer than 60 seconds baibot fails with ...

task ... panicked with message "called Result::unwrap() on an Err value: Custom { kind: InvalidData, error: "Failed to read JSON: expected value at line 1 column 1" }"

Where I could see (and reproduce with curl), that the request (within the n8n workaround I mentioned in the other issue) get completed normally by AnythingLLM and returns the appropriate data ... several seonds after having baibot already fail.

@spantaleev
Copy link
Contributor

This error seems to indicate an invalid JSON response. Maybe it's your reverse-proxy which kills the request after 60 seconds and responds with some kind of HTML.

@nesretep-anp1
Copy link
Author

One would think that; but the same error message occurs if response is empty

Like said, ...

  1. If using curl on the proxy everything works find.
  2. Via baibot I could see that n8n still waits for the response and then renders the response to baibot correctly ((full)logs)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants