Runnable demo of apply_edit tool-calling with N34.
| File | Provider | What it shows |
|---|---|---|
index.ts |
Ollama | Chat with tool call, apply patch, print side-by-side diff |
deno run --allow-net --allow-env --allow-read examples/index.ts| Variable | Required | Default | Purpose |
|---|---|---|---|
OLLAMA_HOST |
No | https://ollama.com |
Base URL of OpenAI-compatible /v1 |
OLLAMA_MODEL |
No | gemma4:31b |
Chat model that supports tool calls |
OLLAMA_API_KEY |
No | "" |
Bearer token when the endpoint gates |
Inline set for one run:
OLLAMA_HOST=https://ollama.com \
OLLAMA_MODEL=gemma4:31b \
OLLAMA_API_KEY=sk-xxxx \
deno run --allow-net --allow-env --allow-read examples/index.tsExport for the session:
export OLLAMA_HOST=https://ollama.com
export OLLAMA_MODEL=gemma4:31b
export OLLAMA_API_KEY=sk-xxxx
deno run --allow-net --allow-env --allow-read examples/index.tsLocal Ollama server:
export OLLAMA_HOST=http://localhost:11434
export OLLAMA_MODEL=qwen2.5-coder:7b
deno run --allow-net --allow-env --allow-read examples/index.ts- Handoff agent, planner LLM emits
apply_edit, executor runsN34.applyon the patched file. - Proxy server, intercept chat traffic, run
apply_editserver-side, return the diff to caller. - Direct integration, load
schemas/*.jsoninto your tool loop, pipe args intoN34.apply.