Dora docs
Skip to Content

AI Assistant

Generate, explain, and fix SQL with a hosted provider such as Groq, OpenAI, Anthropic, or Gemini, or a local Ollama model, with your keys encrypted at rest.

View as Markdown

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

ProviderNeeds an API key?Runs locally?
GroqYesNo
OpenAIYesNo
AnthropicYesNo
GeminiYesNo
DeepSeekYesNo
KimiYesNo
GLMYesNo
QwenYesNo
OpenRouterYesNo
OllamaNoYes

Groq is the default, using llama-3.3-70b-versatile, which is fast and has a generous free tier.

Configure a provider

Open Settings → 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):

ProviderEnvironment variable
GroqGROQ_API_KEY
OpenAIOPENAI_API_KEY
AnthropicANTHROPIC_API_KEY
GeminiGEMINI_API_KEY
DeepSeekDEEPSEEK_API_KEY
KimiKIMI_API_KEY
GLMGLM_API_KEY
QwenQWEN_API_KEY
OpenRouterOPENROUTER_API_KEY

Keys are encrypted at rest with AES-256-GCM; the master key lives in your OS keychain. See Credentials & security.

Run models locally with Ollama

Ollama runs models on your machine: no API key, and no data leaves your computer.

  1. Install Ollama (Dora can detect it and guide a managed install from Settings → Local models).
  2. Start it and pull a model: ollama pull llama3.2.
  3. 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

Open the assistant from its item in the navigation sidebar, or with Mod+Shift+B. It opens as a panel beside the grid or console. From the SQL Console or Data Studio, 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.

If a message fails to send, Dora puts your prompt back in the input so you can send it again.

Hide AI

Turn on Settings → Safety → Hide AI to remove every AI entry point: the assistant panel and its sidebar item, Mod+I generation in the SQL Console, the explain and fix actions, and the AI sections in settings. It is off by default.

Edit this page on GitHub

Last updated on