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

Add URL path to client URL in in Client._parse_host()

Open bplunkert opened this issue 1 year ago • 2 comments

This fix for #113 allows instantiating a client with a custom URL path as part of the host argument.

bplunkert avatar May 29 '24 21:05 bplunkert

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")

HorseCheng avatar Aug 07 '24 13:08 HorseCheng

Resolves #244 as well.

I'd love to see this PR get merged.

jason-heo avatar Aug 10 '24 12:08 jason-heo

thanks @mxyng I've added your suggestions to the pull request.

bplunkert avatar Aug 23 '24 17:08 bplunkert