节点 / builtin / ai / aidependencies / llm
Ollama
Connect a chat model running in Ollama on your computer.
此内容尚不支持你的语言。
Give an AI node a model that runs on your own computer through Ollama: free, private, and no API key.
What it does
Section titled “What it does”Ollama is a model you plug into the Model slot of an AI node, such as the Tools Agent or Basic LLM Chain. It does not run on its own and has no output. When the AI node runs, it sends its messages to the Ollama app on your computer, at http://localhost:11434, and gets the reply back. Nothing leaves your machine.
- The Model list shows the models installed in your Ollama, read live from it. Use the refresh button next to the list after you pull a new model.
- Temperature is 0 when you leave it empty. Replies are capped at Max Tokens (4096 by default).
- There is no time limit on a request, because a large model can take a while to load the first time.
When to use it
Section titled “When to use it”- Private data that must not go to a cloud AI service.
- Many runs without paying per token.
- Open models such as Llama, Mistral, Qwen or Gemma, at the size your computer can handle.
If you can’t install Ollama, use Web LLM, which runs a model inside the browser.
Inputs and settings
Section titled “Inputs and settings”| 设置项 | 类型 | 作用 |
|---|---|---|
| Model (必填) | Model picker | The model to use. |
| Options | Group | The options to use with the model. |
| Options › Temperature | Number | The temperature to use for the model. |
| Options › Max Retries | Number | The maximum number of retries to use for the model. 默认值:2 |
| Options › Max Tokens | Number | The most tokens the model may generate in one reply. Defaults to 4096, which keeps providers from reserving credit for the whole output window. 默认值:4096 |
Before the list can fill:
- Install Ollama from ollama.com and pull a model, for example
ollama pull llama3.2. - Let AWFlow talk to it. Start Ollama with the
OLLAMA_ORIGINSvariable set to the extension:- Chrome:
OLLAMA_ORIGINS=chrome-extension://linlkeaipfpnhddjkpcbmldionajfifa ollama serve - Firefox:
OLLAMA_ORIGINS=moz-extension://* ollama serve
- Chrome:
When you publish or share the workflow, Model is cleared, so whoever installs it picks a model from their own Ollama.
Outputs
Section titled “Outputs”This node has no output port. It plugs into a slot on another node instead of passing items along.
- Model slot of Tools Agent, Q&A Agent, RAG Agent, Basic LLM Chain, Indexer, Text Classifier, Sentiment Analysis, Summarization, Information Extractor, Guardrails, Auto-fixing Output Parser
The AI node you connect it to produces the output. Ollama only decides which model answers.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Example workflow
Section titled “Example workflow”- A Context Menu trigger on selected text.
- Summarization with Text
{{ $input.selectionText }}and Max words60. - Ollama in its Model slot, with Model
llama3.2:latestpicked from the list. - Clipboard Write with Text
{{ $input.summary }}.
Common issues
Section titled “Common issues”- “Could not reach Ollama at localhost:11434. Make sure it is running and allows this extension (OLLAMA_ORIGINS).” Start Ollama, and restart it with
OLLAMA_ORIGINSset as shown above. - The list says “No models available”. Ollama runs but has no models. Pull one (
ollama pull llama3.2), then press the refresh button. - “Model parameter is required and cannot be empty”. Pick a model in Model.
- The first run is very slow. Ollama loads the model into memory on first use. Later runs are faster. A smaller model helps on a laptop.
Related nodes
Section titled “Related nodes”- Ollama Embeddings: Ollama vectors for a knowledge base.
- Web LLM: a local model inside the browser, nothing to install.
- Tools Agent: an agent that can use tools and memory.