Skip to content

Ollama documentation needed for remote URL #274

@michela

Description

@michela

OllamaLLM remote server configuration should be documented - and this package should provide a method for overriding the base_url in code and not rely on undocumented environment variable OLLAMA_HOST

e.g. a parameter like this for clarity

llm = OllamaLLM(
    base_url='http://<YOUR IP>:11434',   # PROPOSAL - NOT SUPPORTED ATM
    model_name=LLM_MODEL, 
    model_params={
        "max_tokens": 2000,
        "response_format": {"type": "json_object"},
    }
)

Atm the only way to get remote OLLAMA server connection is to set OLLAMA_HOST env variable and this is only apparent if you do the above and you get this helpful error / clue!

  base_url=_parse_host(host or os.getenv('OLLAMA_HOST')),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions