obsidian-copilot icon indicating copy to clipboard operation
obsidian-copilot copied to clipboard

Ollama custom URL with basic auth

Open agung2001 opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. I would like to use a custom URL for my ollama instance from my server : https://ollama.example.com but it uses a basic auth token for the authentication process

VSCode extension such as continue.dev uses the same configuration : https://github.com/continuedev/continue/issues/834#issuecomment-1953750202

"models": [ {
      "title": "TinyLLAMA",
      "provider": "ollama",
      "model": "tinyllama",
      "apiBase": "https://ollama.example.com",
      "requestOptions": {
        "headers": {"Authorization": "Basic bXl1c2VybmFtZTpteXBhc3N3b3Jk"}
      }
    }]

Describe the solution you'd like I think adding an additional option to configure the fetch function will be very helpful

Describe alternatives you've considered none

Additional context none

agung2001 avatar Jun 09 '24 12:06 agung2001

This one seems related and a prereq https://github.com/langchain-ai/langchainjs/issues/6631

logancyang avatar Sep 10 '24 21:09 logancyang

Seconding this request, https://github.com/langchain-ai/langchainjs/issues/6631 seems to be merged, unblocking this issue

ivanvmoreno avatar Dec 18 '24 15:12 ivanvmoreno

Any chance auth info can just be passed through the URL?

https://username:[email protected]/

rubin110 avatar Jan 27 '25 00:01 rubin110