From 16df22f8174891d742aa733d863840df8a8367a8 Mon Sep 17 00:00:00 2001 From: Salman Mohammed Date: Fri, 31 Jan 2025 13:47:41 -0500 Subject: [PATCH] chore: update docs for ollama endpoint (#992) --- crates/goose/src/providers/ollama.rs | 1 + documentation/docs/getting-started/providers.md | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/crates/goose/src/providers/ollama.rs b/crates/goose/src/providers/ollama.rs index f8d0f74984..6815cfa321 100644 --- a/crates/goose/src/providers/ollama.rs +++ b/crates/goose/src/providers/ollama.rs @@ -53,6 +53,7 @@ impl OllamaProvider { } async fn post(&self, payload: Value) -> Result { + // TODO: remove this later when the UI handles provider config refresh // OLLAMA_HOST is sometimes just the 'host' or 'host:port' without a scheme let base = if self.host.starts_with("http://") || self.host.starts_with("https://") { self.host.clone() diff --git a/documentation/docs/getting-started/providers.md b/documentation/docs/getting-started/providers.md index 0e381158b0..96ce056c47 100644 --- a/documentation/docs/getting-started/providers.md +++ b/documentation/docs/getting-started/providers.md @@ -164,6 +164,12 @@ Ollama provides local LLMs, which requires a bit more set up before you can use 1. [Download Ollama](https://ollama.com/download). 2. Run any [model supporting tool-calling](https://ollama.com/search?c=tools): + +:::info Ollama Endpoint Construction +For Ollama, we set default host to `localhost` and port to `11434` if you don't provide it. When constructing the URL, we preprend `"http://"` if the scheme is not http or https. +If you're running Ollama on port 80 or 443, you have to set `OLLMA_HOST=http://host:port` +::: + :::warning Limited Support for models without tool calling Goose extensively uses tool calling, so models without it (e.g. `DeepSeek-r1`) can only do chat completion. If using models without tool calling, all Goose [extensions must be disabled](/docs/getting-started/using-extensions#enablingdisabling-extensions). As an alternative, you can use a [custom DeepSeek-r1 model](/docs/getting-started/providers#deepseek-r1) we've made specifically for Goose. :::