You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if its been discussed if using OLLAMA_HOST on the client side makes sense.
There have been a number of instances where I've had to figure out how to pass through the server IP for my remote system running ollama in libraries that use ollama-js under the covers. For example - i-am-bee/bee-agent-framework#83
In this cases it would be easier if we could specify OLLAMA_HOST or something only used at the client like OLLAMA_SERVER without having to figure out how to get it down to the client through the libraries APIs.
It that makes sense I'd be happy to investigate and open a PR but I want to make sure it's something that would be acceptable before investing the time to do that.
The text was updated successfully, but these errors were encountered:
I'll add that even on the same host I had an issue where I had set OLLAMA_HOST to something that did not include localhost (ie not 0.0.0.0) and then had to pass in the host even though I was running on the same machine. In that case have the client support OLLAMA_HOST would have made it more straight forward.
@nise Ollama uses an OLLAMA_HOST environment variable. Depending on your scenario, try something like this:
import{Ollama}from'ollama'constollama=newOllama({host: process.env.OLLAMA_HOST||'http://127.0.0.1:11434'})constresponse=awaitollama.chat({model: 'llama3.1',messages: [{role: 'user',content: 'Why is the sky blue?'}],})
I'm wondering if its been discussed if using OLLAMA_HOST on the client side makes sense.
There have been a number of instances where I've had to figure out how to pass through the server IP for my remote system running ollama in libraries that use ollama-js under the covers. For example - i-am-bee/bee-agent-framework#83
In this cases it would be easier if we could specify
OLLAMA_HOST
or something only used at the client likeOLLAMA_SERVER
without having to figure out how to get it down to the client through the libraries APIs.It that makes sense I'd be happy to investigate and open a PR but I want to make sure it's something that would be acceptable before investing the time to do that.
The text was updated successfully, but these errors were encountered: