---
title: "Working with Ollama in Pixeltable"
description: "Ollama is a popular platform for local serving of LLMs. In this tutorial, we'll show how to integrate Ollama models into a Pixeltable workflow."
url: "https://www.pixeltable.com/notebooks/working-with-ollama"
updated: "2026-10-25"
---

# Working with Ollama in Pixeltable

Ollama is a popular platform for local serving of LLMs. In this tutorial, we'll show how to integrate Ollama models into a Pixeltable workflow.

- **Type:** Notebook
- **Group:** Providers

## What it uses

- **Install:** `pip install ollama pixeltable`
- **Pixeltable calls:** `ollama.chat()`, `pxt.create_table()`, `add_computed_column()`, `insert()`

## A look at the code

```python
t = pxt.create_table('ollama_demo/chat', {'input': pxt.String})

messages = [{'role': 'user', 'content': t.input}]

# Add a computed column that runs the model to generate responses
t.add_computed_column(
    output=chat(
        messages=messages,
        model='qwen3:0.6b',
        # These parameters are optional and can be used to tune model behavior:
        options={'max_tokens': 300, 'top_p': 0.9, 'temperature': 0.5},
    )
)
```

## Open it

- **Open in Colab:** https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/providers/working-with-ollama.ipynb
- **Docs page:** https://docs.pixeltable.com/howto/providers/working-with-ollama
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/howto/providers/working-with-ollama.ipynb
