Artificial Intelligence
A personal assistant with local AI: Ollama, DeepSeek and Tauri
Some conversations shouldn't go to a cloud. I wrote an AI assistant that runs entirely on my own computer and opens even without internet; here's what I paid attention to when choosing and running a local model.
I use AI assistants every day, even while writing parts of this site. But I don't want every conversation to go to a cloud. Personal notes, half-formed ideas, a client's project that hasn't been shared yet; those should stay on my computer. WaifuChat came from that thought: a personal assistant that runs entirely on the device and opens even without internet.
Why local?
Running a language model locally has three clear benefits:
- Privacy: conversations never leave the device; nobody logs them, nobody uses them as training data.
- Availability: it works without internet.
- Cost: no per-use fees; it does as much as your hardware allows.
The cost is just as clear: local models aren't as capable as large cloud models, and a good experience needs enough memory and ideally a GPU. So the real question isn't "local or cloud?" but "which is good enough for this job?".
Ollama: the simplest way to run a model
Instead of embedding the model directly in the app, I used Ollama. It downloads models and serves them through a local HTTP server; memory management and hardware acceleration are its job. On the app side, all that remains is an HTTP client.
let res = client
.post("http://127.0.0.1:11434/api/chat")
.json(&json!({ "model": model, "messages": history, "stream": true }))
.send()
.await?;
// The response arrives line by line; each chunk is forwarded to the UI as an event.Streaming changes the experience completely. Instead of waiting for the whole answer, words appear as they arrive; even when the local model is slower, the assistant feels like it's talking, not thinking.
Choosing a model: DeepSeek-R1
The DeepSeek-R1 family writes out its reasoning steps explicitly. Its small, distilled versions can run even on an ordinary computer. What I paid attention to when choosing:
- The model has to fit comfortably in memory; a model running at the edge spills to disk and becomes unbearably slow.
- Turkish ability varies a lot from model to model; I didn't decide without testing my own use cases.
- The reasoning output can be long; showing it as a collapsible section in the UI makes reading easier.
Character and the system message
Giving the assistant a personality is done with the system message. What I learned is that a short, clear character description works better than a long, ornate one. When the model knows what it is and what it shouldn't do in a few sentences, it behaves more consistently. Keeping history limited in long conversations improves both speed and consistency.
Why Tauri?
With a model already using most of the memory in the background, I didn't want the UI to eat hundreds of megabytes too. Tauri uses the operating system's web view, and the Rust backend talks to the local model server with low latency. I used the same streaming architecture in another desktop app that talks as the character Lain. There the model runs in the cloud, but because the request is made on the Rust side, the API key never enters the web view; the answer streams to the UI piece by piece through Tauri events.
Who is it for?
A local assistant makes sense for teams working with sensitive data, for environments with limited internet, or for anyone who simply wants their conversations to stay with them. An assistant that works over a company's internal documents can be built with the same architecture, without sending the data anywhere.
Every convenience technology offers comes with a cost; sometimes that cost is words whose destination we don't know. An assistant that talks on my own computer, in my own voice, gave me back something small but valuable: choosing what I share, and with whom.