ollama-python
ollama-python copied to clipboard
Add URL path to client URL in in Client._parse_host()
This fix for #113 allows instantiating a client with a custom URL path as part of the host argument.
Someone please approve the PR and merge the code. 🥺
ChatOllama uses this library, which has an issue that needs to be addressed as well. The sample code below shows that the URL path "copilot" is not passed in:
from langchain_ollama import ChatOllama
chat_model = ChatOllama(
model="llama3.1",
base_url = "https://aaaaaaaaaaa.com/copilot"
)
chat_model.invoke("hello")
Resolves #244 as well.
I'd love to see this PR get merged.
thanks @mxyng I've added your suggestions to the pull request.