项目文件夹

文件
wehub-resource-sync 8a21a212f8
Deploy Documentation / deploy (push) Has been cancelled
Canary / build-cli (push) Has been skipped
Canary / Upload Install Script (push) Has been skipped
Canary / bundle-desktop (push) Has been skipped
Canary / bundle-desktop-intel (push) Has been skipped
Canary / bundle-desktop-linux (push) Has been skipped
Canary / bundle-desktop-windows (push) Has been skipped
Canary / bundle-desktop-windows-cuda (push) Has been skipped
Canary / Release (push) Has been skipped
Cargo Deny / deny (push) Has been skipped
Unused Dependencies / machete (push) Has been skipped
Canary / Prepare Version (push) Failing after 1s
Live Provider Tests / check-fork (push) Failing after 0s
Create Minor Release PR / check-version-bump-pr (push) Has been skipped
Publish Ask AI Bot Docker Image / docker (push) Failing after 1s
Live Provider Tests / changes (push) Has been skipped
Scorecard supply-chain security / Scorecard analysis (push) Has been skipped
Publish Docker Image / docker (push) Failing after 1s
CI / changes (push) Failing after 8s
Create Minor Release PR / release (push) Has been skipped
Live Provider Tests / Smoke Tests (push) Has been cancelled
Live Provider Tests / Smoke Tests (Code Execution) (push) Has been cancelled
Live Provider Tests / Compaction Tests (push) Has been cancelled
CI / Build Rust Project on Windows (push) Has been cancelled
Live Provider Tests / Build Binary (push) Has been cancelled
CI / Lint Rust Code (push) Has been cancelled
CI / Check Generated Schemas are Up-to-Date (push) Has been cancelled
CI / Test and Lint Electron Desktop App (push) Has been cancelled
CI / Check Rust Code Format (push) Has been cancelled
CI / Build and Test Rust Project (push) Has been cancelled
CI / Check MSRV (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:04:08 +08:00

1.7 KiB

title, sidebar_position, sidebar_label
title sidebar_position sidebar_label
Ollama Tool Shim 2 Ollama Tool Shim

The Ollama tool shim enables tool calling capabilities for language models that don't natively support tool calling (like DeepSeek).

:::warning Experimental Feature Ollama tool shim is an experimental feature. Behavior and configuration may change in future releases. :::

The tool shim works by instructing the primary model to output json for intended tool usage, the interpretive model uses ollama structured outputs to translate the primary model's message into valid json, and then that json is translated into valid tool calls to be invoked.

How to use the Ollama Tool Shim

  1. Make sure you have Ollama installed and running

  2. The default interpreter model is mistral-nemo, if you want to proceed with this, you have to pull it from ollama server by running:

    ollama pull mistral-nemo
    
  3. If you want to use a different model, make sure to pull it first from the Ollama server. Then override the default interpreter model using the GOOSE_TOOLSHIM_OLLAMA_MODEL environment variable. For example, to use the llama3.2 model, run:

    ollama pull llama3.2
    

    Then,

    GOOSE_TOOLSHIM_OLLAMA_MODEL=llama3.2 
    
  4. For optimal performance, run the Ollama server with an increased context length:

    OLLAMA_CONTEXT_LENGTH=32768 ollama serve
    
  5. Enable the tool shim by setting the GOOSE_TOOLSHIM environment variable:

    GOOSE_TOOLSHIM=1 
    

Start a new goose session with your tool shim preferences:

GOOSE_TOOLSHIM=1 GOOSE_TOOLSHIM_OLLAMA_MODEL=llama3.2 cargo run --bin goose session