From aeadbeb226c67b66d426137a0391d759418088f2 Mon Sep 17 00:00:00 2001 From: byarbrough <6315292+byarbrough@users.noreply.github.com> Date: Fri, 28 Mar 2025 09:17:56 -0600 Subject: [PATCH 1/2] Add OLLAMA_HOST blurb to README Without this it's opaque that the library is making HTTP requests, or to where it might be making them. The only place I could find how to change the localhost:11434 behavior was in the Ollama FAQs. If there is a way to set it besides OLLAMA_HOST I would love to know! --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 172d3252..ebd0d00a 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ The Ollama Python library provides the easiest way to integrate Python 3.8+ proj - Pull a model to use with the library: `ollama pull ` e.g. `ollama pull llama3.2` - See [Ollama.com](https://ollama.com/search) for more information on the models available. +The library connects to Ollama running on `http://localhost:11434` by default. +You can change this address by setting the `OLLAMA_HOST` environment variable. +Refer to the [FAQs](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server) for how to set environment variables on your platform. + ## Install ```sh From 755ff5f97ccb18a5050e075f4c3bfd36d686721f Mon Sep 17 00:00:00 2001 From: byarbrough <6315292+byarbrough@users.noreply.github.com> Date: Fri, 28 Mar 2025 15:45:26 -0600 Subject: [PATCH 2/2] Tweak README to mention custom client earlier --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ebd0d00a..3793a1d6 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ The Ollama Python library provides the easiest way to integrate Python 3.8+ proj - See [Ollama.com](https://ollama.com/search) for more information on the models available. The library connects to Ollama running on `http://localhost:11434` by default. -You can change this address by setting the `OLLAMA_HOST` environment variable. -Refer to the [FAQs](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server) for how to set environment variables on your platform. +You can change this address with the [custom client](https://github.com/ollama/ollama-python?tab=readme-ov-file#custom-client) +or by setting the [`OLLAMA_HOST`](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-expose-ollama-on-my-network) environment variable. ## Install