Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ SQLBot 是一款基于大语言模型和 RAG 的智能问数系统,由 DataEas
- **易于集成**:支持多种集成方式,提供 Web 嵌入、弹窗嵌入、MCP 调用等能力;能够快速嵌入到 n8n、Dify、MaxKB、DataEase 等应用,让各类应用快速拥有智能问数能力。
- **越问越准**:支持自定义提示词、术语库配置,可维护 SQL 示例校准逻辑,精准匹配业务场景;高效运营,基于用户交互数据持续迭代优化,问数效果随使用逐步提升,越问越准。

## 支持的大模型服务商

| 服务商 | API 兼容 |
|--------|----------|
| 阿里云百炼 | OpenAI 兼容 |
| 千帆大模型 | OpenAI 兼容 |
| DeepSeek | OpenAI 兼容 |
| 腾讯混元 | OpenAI 兼容 |
| 讯飞星火 | OpenAI 兼容 |
| Gemini | OpenAI 兼容 |
| OpenAI | 原生 |
| Kimi | OpenAI 兼容 |
| 腾讯云 | OpenAI 兼容 |
| 火山引擎 | OpenAI 兼容 |
| MiniMax | OpenAI 兼容 |
| 通用 OpenAI 兼容 | 自定义 |

## 快速开始

### 安装部署
Expand Down
17 changes: 17 additions & 0 deletions docs/README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ SQLBot is an intelligent data query system based on large language models and RA
- **Easy Integration:** Supports multiple integration methods, providing capabilities such as web embedding, pop-up embedding, and MCP invocation. It can be quickly embedded into applications such as n8n, Dify, MaxKB, and DataEase, allowing various applications to quickly acquire intelligent data collection capabilities.
- **Increasingly Accurate with Use:** Supports customizable prompts and terminology library configurations, maintainable SQL example calibration logic, and accurate matching of business scenarios. Efficient operation, based on continuous iteration and optimization using user interaction data, the data collection effect gradually improves with use, becoming more accurate with each use.

## Supported LLM Providers

| Provider | API Compatibility |
|----------|-------------------|
| Alibaba Cloud Bailian | OpenAI Compatible |
| Qianfan Model | OpenAI Compatible |
| DeepSeek | OpenAI Compatible |
| Tencent Hunyuan | OpenAI Compatible |
| iFlytek Spark | OpenAI Compatible |
| Gemini | OpenAI Compatible |
| OpenAI | Native |
| Kimi | OpenAI Compatible |
| Tencent Cloud | OpenAI Compatible |
| Volcano Engine | OpenAI Compatible |
| MiniMax | OpenAI Compatible |
| Generic OpenAI Compatible | Custom |

## Quick Start

### Installation and Deployment
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions frontend/src/entity/supplier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import icon_txhy_colorful from '@/assets/model/icon_txhy_colorful.png'
import icon_hsyq_colorful from '@/assets/model/icon_hsyq_colorful.png'
// import icon_vllm_colorful from '@/assets/model/icon_vllm_colorful.png'
import icon_common_openai from '@/assets/model/icon_common_openai.png'
import icon_minimax_colorful from '@/assets/model/icon_minimax_colorful.png'
// import icon_azure_openAI_colorful from '@/assets/model/icon_Azure_OpenAI_colorful.png'

type ModelArg = { key: string; val?: string | number; type: string; range?: string }
Expand Down Expand Up @@ -276,6 +277,23 @@ export const supplierList: Array<{
},
},
},
{
id: 13,
name: 'MiniMax',
i18nKey: 'supplier.minimax',
icon: icon_minimax_colorful,
model_config: {
0: {
api_domain: 'https://api.minimax.io/v1',
common_args: [{ key: 'temperature', val: 0.7, type: 'number', range: '[0, 1]' }],
model_options: [
{ name: 'MiniMax-M2.7' },
{ name: 'MiniMax-M2.5' },
{ name: 'MiniMax-M2.5-highspeed' },
],
},
},
},
/* {
id: 11,
name: 'vLLM',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@
"kimi": "Kimi",
"tencent_cloud": "Tencent Cloud",
"volcano_engine": "Volcano Engine",
"minimax": "MiniMax",
"generic_openai": "Generic OpenAI"
},
"modelType": {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/ko-KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@
"kimi": "Kimi",
"tencent_cloud": "텐센트 클라우드",
"volcano_engine": "볼케이노 엔진",
"minimax": "MiniMax",
"generic_openai": "범용 OpenAI"
},
"modelType": {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@
"kimi": "Kimi",
"tencent_cloud": "腾讯云",
"volcano_engine": "火山引擎",
"minimax": "MiniMax",
"generic_openai": "通用OpenAI"
},
"modelType": {
Expand Down
91 changes: 91 additions & 0 deletions tests/test_minimax_integration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
"""
Integration tests for MiniMax LLM provider in SQLBot.

These tests validate that the MiniMax API is reachable and functioning
correctly via the OpenAI-compatible protocol.

Requires MINIMAX_API_KEY environment variable to be set.
"""

import json
import os
import unittest

import requests

MINIMAX_API_KEY = os.environ.get("MINIMAX_API_KEY", "")
MINIMAX_BASE_URL = "https://api.minimax.io/v1"


def skip_without_api_key(func):
"""Skip test if MINIMAX_API_KEY is not set."""
return unittest.skipUnless(MINIMAX_API_KEY, "MINIMAX_API_KEY not set")(func)


class TestMiniMaxAPIConnectivity(unittest.TestCase):
"""Test MiniMax API endpoint reachability."""

@skip_without_api_key
def test_api_endpoint_reachable(self):
"""MiniMax API endpoint should be reachable (chat completions)."""
resp = requests.post(
f"{MINIMAX_BASE_URL}/chat/completions",
headers={
"Authorization": f"Bearer {MINIMAX_API_KEY}",
"Content-Type": "application/json",
},
json={
"model": "MiniMax-M2.5-highspeed",
"messages": [{"role": "user", "content": "Hi"}],
"max_tokens": 1,
},
timeout=15,
)
self.assertEqual(resp.status_code, 200)

@skip_without_api_key
def test_chat_completions_basic(self):
"""MiniMax chat completions should return a valid response."""
resp = requests.post(
f"{MINIMAX_BASE_URL}/chat/completions",
headers={
"Authorization": f"Bearer {MINIMAX_API_KEY}",
"Content-Type": "application/json",
},
json={
"model": "MiniMax-M2.5-highspeed",
"messages": [{"role": "user", "content": "Say hello in one word."}],
"temperature": 0.7,
"max_tokens": 10,
},
timeout=30,
)
self.assertEqual(resp.status_code, 200)
data = resp.json()
self.assertIn("choices", data)
self.assertGreater(len(data["choices"]), 0)
content = data["choices"][0]["message"]["content"]
self.assertTrue(len(content) > 0, "Response content should not be empty")

@skip_without_api_key
def test_temperature_zero_accepted(self):
"""MiniMax API should accept temperature=0."""
resp = requests.post(
f"{MINIMAX_BASE_URL}/chat/completions",
headers={
"Authorization": f"Bearer {MINIMAX_API_KEY}",
"Content-Type": "application/json",
},
json={
"model": "MiniMax-M2.5-highspeed",
"messages": [{"role": "user", "content": "Reply with OK."}],
"temperature": 0,
"max_tokens": 5,
},
timeout=30,
)
self.assertEqual(resp.status_code, 200)


if __name__ == "__main__":
unittest.main()
Loading