AI Configuration¶
Configure local AI processing with Ollama.
Model Selection¶
Available Models¶
| Model | Size | RAM Required | Best For |
|---|---|---|---|
tinyllama |
637 MB | 2 GB | Quick tests |
phi3 |
2.2 GB | 4 GB | Light usage |
llama3.2:3b |
2.0 GB | 4 GB | Balanced |
llama3.2:7b |
4.7 GB | 8 GB | Quality |
mistral |
4.1 GB | 8 GB | General purpose |
Setting the Model¶
Download Models Manually¶
GPU Acceleration¶
NVIDIA GPUs¶
Ensure NVIDIA Container Toolkit is installed:
# Install toolkit
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt update && sudo apt install -y nvidia-container-toolkit
sudo systemctl restart docker
Verify GPU Access¶
Disabling AI¶
For resource-constrained environments:
Custom Prompts¶
AI perspectives are generated using configurable prompts. Example prompts are provided out of the box, and you can add your own using either of the following approaches.
Option 1: prompts.json (legacy, still functional)¶
Create a prompts.json file in the prompts folder at the root of the application (see prompts_example.json in the same folder for the expected structure). This folder is mounted as a Docker volume, so changes are picked up without rebuilding images.
Option 2: Prompts API (recommended)¶
Using the TruSpace API, you can create, read, update, or delete prompts — persisted in the SQLite database rather than a static file. The frontend for managing prompts through the UI is not yet complete, but you can drive the API directly with curl.
See scripts/prompts/examples.sh for a full worked example, including the login flow. The Prompts API is protected — only registered users can view and edit prompts, and the example script illustrates the required login/cookie handling.