Skip to content

Commit

Permalink
chore: update docs for ollama endpoint (#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
salman1993 authored Jan 31, 2025
1 parent 7a427c6 commit 16df22f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/goose/src/providers/ollama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ impl OllamaProvider {
}

async fn post(&self, payload: Value) -> Result<Value, ProviderError> {
// 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()
Expand Down
6 changes: 6 additions & 0 deletions documentation/docs/getting-started/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
:::
Expand Down

0 comments on commit 16df22f

Please sign in to comment.