ollama-python icon indicating copy to clipboard operation
ollama-python copied to clipboard

fix: 502 gateway error

Open sally-langshuang opened this issue 11 months ago • 1 comments

Disables HTTP/2 and forces the client to use HTTP/1.1. Some servers (especially custom/local deployments like Ollama) might not fully support or handle HTTP/2 properly, which can cause unexpected issues.

configures the underlying HTTP transport to retry failed requests up to 3 times. This is helpful for flaky local servers, slow responses, or temporary network hiccups. httpx by default does not retry, so this can make your client more resilient.

sally-langshuang avatar Apr 22 '25 08:04 sally-langshuang

HTTP/2 is pretty standard for most servers, doesn't make sense to default to 1.1. What issues were you running into?

ParthSareen avatar Apr 22 '25 18:04 ParthSareen