public
synced 2026-11-26 05:05:15 +00:00
code
clone this repository
search code…
latest commit message
ollama-test
A small terminal UI for chatting with Ollama cloud models.
Usage
Create an Ollama API key, then run:
export OLLAMA_API_KEY=your_api_key
go run ./cmd/ollama-tui
You can also put OLLAMA_API_KEY=your_api_key in a local .env file.
The app uses https://ollama.com/api by default, loads models from /api/tags, lets you pick a model, and streams chat responses from /api/chat. After each response it shows last-response tokens per second, input/output/total tokens, available timing fields, and session token totals. If Ollama cloud only returns total duration, token rate is calculated from that instead of showing zero generation time.
Use a different API endpoint with either:
OLLAMA_BASE_URL=http://localhost:11434/api go run ./cmd/ollama-tui
or:
go run ./cmd/ollama-tui -base-url http://localhost:11434/api
Controls
enter: select a model or send a prompt/: filter modelsctrl+p: return to the model pickerr: retry after an errorq: quit from the model picker, loading, waiting, or error screenctrl+c: quit from anywhere