Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/dataease/SQLBot/llms.txt

Use this file to discover all available pages before exploring further.

SQLBot converts natural language questions into SQL queries by sending your schema context and the user’s question to a large language model (LLM). Without a configured model, the chat interface will refuse all query requests. This page explains how to add models, set a default, verify connectivity, and manage your model list as an administrator.

Why you need an LLM

Every query in SQLBot goes through three stages: the user types a question, SQLBot enriches it with your table schema and training examples using RAG (Retrieval-Augmented Generation), and then sends the enriched prompt to the configured LLM. The model returns SQL, which SQLBot executes against your datasource and renders as a table or chart. No model means no SQL generation.

Supported providers

SQLBot supports OpenAI’s native API and any provider that exposes an OpenAI-compatible endpoint.
ProviderProtocolExample models
OpenAIOpenAI nativegpt-4o, gpt-4-turbo, gpt-3.5-turbo
DeepSeekOpenAI compatibledeepseek-chat, deepseek-coder
Alibaba Cloud BailianOpenAI compatibleqwen-turbo, qwen-plus, qwen-max
Qianfan (Baidu)OpenAI compatibleernie-4.0
Tencent HunyuanOpenAI compatiblehunyuan-pro
iFlytek SparkOpenAI compatible
Google GeminiOpenAI compatiblegemini-1.5-pro, gemini-1.5-flash
Kimi (Moonshot)OpenAI compatiblemoonshot-v1-8k, moonshot-v1-32k
Tencent CloudOpenAI compatible
Volcano Engine (Doubao)OpenAI compatible
MiniMaxOpenAI compatible
Any self-hosted endpointOpenAI compatibleAny model behind a vLLM or similar proxy

Adding a model

Navigate to System Settings → AI Models and click Add model.
1

Enter a display name

The Model name field is what appears in the UI when selecting models. Use something descriptive like "GPT-4o (Production)" or "DeepSeek Chat".
2

Select the supplier and model type

Choose your provider from the Supplier dropdown. This sets the model type, which controls how SQLBot initialises the LangChain client internally.
3

Choose the protocol

Select the API protocol:

OpenAI native (1)

Use for the official OpenAI API. SQLBot sends requests directly to https://api.openai.com using langchain-openai.

OpenAI compatible (2)

Use for any provider that accepts OpenAI-format requests. You must supply the provider’s base URL in the API domain field.
4

Enter the base model name

The Base model field must match the exact model identifier the provider expects — for example gpt-4o, deepseek-chat, or gemini-1.5-pro. This value is passed directly to the model’s API.
5

Add your API key

Paste your API key into the API key field. SQLBot encrypts this value at rest. For self-hosted endpoints that do not require a key, you can enter any placeholder string.
6

Set the API domain (OpenAI-compatible only)

For non-OpenAI providers, enter the full base URL in the API domain field. This is the root endpoint the provider uses for chat completions — for example:
https://api.deepseek.com
https://dashscope.aliyuncs.com/compatible-mode/v1
Leave this field blank when using the OpenAI native protocol, as the SDK uses OpenAI’s endpoint automatically.
7

Add extra configuration parameters (optional)

The Config section accepts additional key-value pairs that are passed directly to the LangChain model constructor. Use this for provider-specific settings:
[
  { "key": "temperature", "val": 0.0, "name": "Temperature" },
  { "key": "max_tokens",  "val": 4096, "name": "Max tokens" }
]
For Azure OpenAI, use this section to supply api_version and deployment_name.
8

Test the connection

Click Test connection before saving. SQLBot sends the prompt "1+1=?" to the model and streams the response back. A successful test confirms your API key, base URL, and model name are all correct.
9

Save the model

Click Confirm. If this is the first model you have added, it is automatically set as the default.

Setting the default model

SQLBot uses a single default model for all SQL generation unless a workspace or assistant overrides it. Only one model can be the default at any time. To change the default:
  1. Open System Settings → AI Models.
  2. Find the model you want to promote.
  3. Click the Set as default button (star icon).
SQLBot immediately unsets the previous default and marks the new model. The change applies to all subsequent queries — in-flight requests complete using the model that was default when they started.
You cannot delete the current default model. To remove it, first set a different model as the default, then delete the original.

Testing a model connection

You can test any model at any time — not only during creation. Open the model’s detail panel and click Test connection. The test streams a short response in real time. Any errors (invalid key, unreachable endpoint, wrong model name) appear inline in the test output.
Run a connection test after rotating API keys or changing a provider’s base URL to confirm the update took effect.

Editing a model

Click a model’s row to open its detail panel. All fields except the model’s internal ID can be updated. After editing, run a connection test to confirm the changes work before saving.

Deleting a model

Select a model and click Delete.
The default model cannot be deleted. If you try, SQLBot returns an error. Promote another model to default first.

Troubleshooting

Verify that the API key is correct and has not expired. For OpenAI-compatible providers, confirm the key is valid for the specific base URL you entered.
Check that the API domain URL is reachable from your SQLBot server. For self-hosted models, ensure the inference service is running and the port is accessible.
Confirm the model is set as the default, or that the workspace/assistant is configured to use it. Also verify the Base model name exactly matches what the provider’s API accepts.
No model is currently set as the default. Go to System Settings → AI Models and click Set as default on any model.

Build docs developers (and LLMs) love