AI Assistant
Generate, explain, and fix SQL with Groq, OpenAI, Anthropic, Gemini, or a local Ollama model — with your keys encrypted at rest.
AI Assistant
Dora's AI assistant helps you write SQL from a description, explain an existing query, fix an error, or suggest indexes — with the connected schema as context. It works with a hosted provider (with an API key) or a fully local model.
Providers
| Provider | Needs an API key? | Runs locally? |
|---|---|---|
| Groq | Yes | No |
| OpenAI | Yes | No |
| Anthropic | Yes | No |
| Gemini | Yes | No |
| Ollama | No | Yes |
Groq is the default, using llama-3.3-70b-versatile — fast, with a generous
free tier.
Configure a provider
Open Sidebar → AI keys, pick a provider, and add a key. You can name a key, Test it, and choose a model. Alternatively, set the matching environment variable before launching Dora and it is picked up automatically (a key saved in the app takes precedence):
| Provider | Environment variable |
|---|---|
| Groq | GROQ_API_KEY |
| OpenAI | OPENAI_API_KEY |
| Anthropic | ANTHROPIC_API_KEY |
| Gemini | GEMINI_API_KEY |
Run models locally with Ollama
Ollama runs models on your machine — no API key, and no data leaves your computer.
- Install Ollama (Dora can detect it and guide a managed install from Sidebar → AI keys → Ollama).
- Start it and pull a model:
ollama pull llama3.2. - Select Ollama as the provider. The default model is
llama3.2.
Dora's built-in Ollama manager shows whether the server is running, lists and pulls models with live progress, and removes models you no longer need.
Use it
From the SQL Console or Data Studio, open the assistant and ask it to:
- generate — "find users who haven't logged in for 30 days",
- explain — paste a query and ask what it does,
- fix — share a failing query and its error,
- optimize — ask which indexes would help a query.