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

Fixes URL parsing when basic auth is included in the URL.

Open lemeur opened this issue 4 months ago • 0 comments

Ollama may be protected by a reverse proxy enforcing basic auth.

When the Ollama URL contains basic auth elements, ollama-python removed them from the URL leading in a HTTP 401 ERROR.

from ollama import Client
client = Client(host='http://<username>:<password>@<ip>:<port>/')

This patch fixes the parsing of the URL so that basic auth elements are not removed.

lemeur avatar Feb 12 '24 20:02 lemeur