Fixes URL parsing when basic auth is included in the URL.
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.
Ran into this Problem today. Would be really nice if this pull request would be accepted
I also ran into this issue quite a while ago and I can also confirm that this solves the issue.
I would really love to see this fix on main
Thanks for the approval!
Any updates here ?
No updates? I'm still relying on installing a custom wheel in internal deployments