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
20 changes: 20 additions & 0 deletions wren-ai-service/docs/config_examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,23 @@ The `config.qwen3.yaml` file provides an example configuration for using Qwen3 m
```

**Note**: You need to set `OPENROUTER_API_KEY` in your `~/.wrenai/.env` file to use OpenRouter as the provider for Qwen3 models.

## MiniMax Configuration

The `config.minimax.yaml` file provides an example configuration for using [MiniMax](https://www.minimax.io/) models via the dedicated `minimax_llm` provider. This provider talks directly to the MiniMax OpenAI-compatible API with built-in temperature clamping and automatic `response_format` removal.

### Available Models

| Model | Context Window | Description |
|-------|---------------|-------------|
| `MiniMax-M2.7` (default) | 204,800 tokens | Latest flagship model with enhanced reasoning and coding |
| `MiniMax-M2.7-highspeed` | 204,800 tokens | High-speed version of M2.7 for low-latency scenarios |
| `MiniMax-M2.5` | 204,800 tokens | Peak Performance. Ultimate Value. Master the Complex |
| `MiniMax-M2.5-highspeed` | 204,800 tokens | Same performance, faster and more agile |

### Key Notes

- **Temperature**: MiniMax requires temperature in the range `(0, 1.0]`. The provider automatically clamps values — `0` becomes `0.01`.
- **`response_format`**: Not supported by MiniMax. The provider strips it automatically.
- **API endpoints**: International `https://api.minimax.io/v1` (default), China mainland `https://api.minimaxi.com/v1`.
- Set `MINIMAX_API_KEY=<your_api_key>` in your `~/.wrenai/.env` file.
202 changes: 202 additions & 0 deletions wren-ai-service/docs/config_examples/config.minimax.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
# you should rename this file to config.yaml and put it in ~/.wrenai
# please pay attention to the comments starting with # and adjust the config accordingly, 3 steps basically:
# 1. you need to use your own llm and embedding models
# 2. fill in embedding model dimension in the document_store section
# 3. you need to use the correct pipe definitions based on https://raw.githubusercontent.com/canner/WrenAI/<WRENAI_VERSION_NUMBER>/docker/config.example.yaml
# 4. you need to fill in correct llm and embedding models in the pipe definitions
Comment on lines +1 to +6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Minor: Comment lists 4 steps but says "3 steps basically".

The comment on line 2 mentions "3 steps basically" but then lists steps 1 through 4.

📝 Suggested fix
-# please pay attention to the comments starting with # and adjust the config accordingly, 3 steps basically:
+# please pay attention to the comments starting with # and adjust the config accordingly, 4 steps basically:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# you should rename this file to config.yaml and put it in ~/.wrenai
# please pay attention to the comments starting with # and adjust the config accordingly, 3 steps basically:
# 1. you need to use your own llm and embedding models
# 2. fill in embedding model dimension in the document_store section
# 3. you need to use the correct pipe definitions based on https://raw.githubusercontent.com/canner/WrenAI/<WRENAI_VERSION_NUMBER>/docker/config.example.yaml
# 4. you need to fill in correct llm and embedding models in the pipe definitions
# you should rename this file to config.yaml and put it in ~/.wrenai
# please pay attention to the comments starting with # and adjust the config accordingly, 4 steps basically:
# 1. you need to use your own llm and embedding models
# 2. fill in embedding model dimension in the document_store section
# 3. you need to use the correct pipe definitions based on https://raw.githubusercontent.com/canner/WrenAI/<WRENAI_VERSION_NUMBER>/docker/config.example.yaml
# 4. you need to fill in correct llm and embedding models in the pipe definitions
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@wren-ai-service/docs/config_examples/config.minimax.yaml` around lines 1 - 6,
The header comment incorrectly says "3 steps basically" while enumerating four
steps; update the comment so the count matches the list—either change the phrase
"3 steps basically" to "4 steps basically" or remove/merge one of the numbered
items so there are three steps; locate the top-of-file comment containing the
phrase "3 steps basically" and edit it accordingly to keep the comment
consistent with the enumerated steps.


# MiniMax LLM provider — uses the dedicated minimax_llm provider for direct
# OpenAI-compatible integration with temperature clamping and response_format
# removal handled automatically.
# API docs: https://platform.minimax.io/docs/api-reference/text-openai-api

type: llm
provider: minimax_llm
models:
# put MINIMAX_API_KEY=<your_api_key> in ~/.wrenai/.env
# International endpoint (default): https://api.minimax.io/v1
# China mainland endpoint: https://api.minimaxi.com/v1
- model: MiniMax-M2.7
alias: default
context_window_size: 204800
timeout: 120
kwargs:
max_tokens: 4096
n: 1
temperature: 1.0
- model: MiniMax-M2.7-highspeed
context_window_size: 204800
timeout: 120
kwargs:
max_tokens: 4096
n: 1
temperature: 1.0
- model: MiniMax-M2.5
context_window_size: 204800
timeout: 120
kwargs:
max_tokens: 4096
n: 1
temperature: 1.0
- model: MiniMax-M2.5-highspeed
context_window_size: 204800
timeout: 120
kwargs:
max_tokens: 4096
n: 1
temperature: 1.0

---
type: embedder
provider: litellm_embedder
models:
# define OPENAI_API_KEY=<api_key> in ~/.wrenai/.env if you are using openai embedding model
# please refer to LiteLLM documentation for more details: https://docs.litellm.ai/docs/providers
- model: text-embedding-3-large # put your embedding model name here, if it is not openai embedding model, should be <provider>/<model_name>
alias: default
api_base: https://api.openai.com/v1 # change this according to your embedding model
timeout: 120

---
type: engine
provider: wren_ui
endpoint: http://wren-ui:3000

---
type: engine
provider: wren_ibis
endpoint: http://ibis-server:8000

---
type: document_store
provider: qdrant
location: http://qdrant:6333
embedding_model_dim: 3072 # put your embedding model dimension here
timeout: 120
recreate_index: true

---
# please change the llm and embedder names to the ones you want to use
# the format of llm and embedder should be <provider>.<model_name> such as minimax_llm.default
# the pipes may be not the latest version, please refer to the latest version: https://raw.githubusercontent.com/canner/WrenAI/<WRENAI_VERSION_NUMBER>/docker/config.example.yaml
type: pipeline
pipes:
- name: db_schema_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: historical_question_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: table_description_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: db_schema_retrieval
llm: minimax_llm.default
embedder: litellm_embedder.default
document_store: qdrant
- name: historical_question_retrieval
embedder: litellm_embedder.default
document_store: qdrant
- name: sql_generation
llm: minimax_llm.default
engine: wren_ui
document_store: qdrant
- name: sql_correction
llm: minimax_llm.default
engine: wren_ui
document_store: qdrant
- name: followup_sql_generation
llm: minimax_llm.default
engine: wren_ui
document_store: qdrant
- name: sql_answer
llm: minimax_llm.default
- name: semantics_description
llm: minimax_llm.default
- name: relationship_recommendation
llm: minimax_llm.default
engine: wren_ui
- name: question_recommendation
llm: minimax_llm.default
- name: question_recommendation_db_schema_retrieval
llm: minimax_llm.default
embedder: litellm_embedder.default
document_store: qdrant
- name: question_recommendation_sql_generation
llm: minimax_llm.default
engine: wren_ui
document_store: qdrant
- name: chart_generation
llm: minimax_llm.default
- name: chart_adjustment
llm: minimax_llm.default
- name: intent_classification
llm: minimax_llm.default
embedder: litellm_embedder.default
document_store: qdrant
- name: misleading_assistance
llm: minimax_llm.default
- name: data_assistance
llm: minimax_llm.default
- name: sql_pairs_indexing
document_store: qdrant
embedder: litellm_embedder.default
- name: sql_pairs_retrieval
document_store: qdrant
embedder: litellm_embedder.default
llm: minimax_llm.default
- name: preprocess_sql_data
llm: minimax_llm.default
- name: sql_executor
engine: wren_ui
- name: user_guide_assistance
llm: minimax_llm.default
- name: sql_question_generation
llm: minimax_llm.default
- name: sql_generation_reasoning
llm: minimax_llm.default
- name: followup_sql_generation_reasoning
llm: minimax_llm.default
- name: sql_regeneration
llm: minimax_llm.default
engine: wren_ui
- name: instructions_indexing
embedder: litellm_embedder.default
document_store: qdrant
- name: instructions_retrieval
embedder: litellm_embedder.default
document_store: qdrant
- name: sql_functions_retrieval
engine: wren_ibis
document_store: qdrant
- name: project_meta_indexing
document_store: qdrant
- name: sql_tables_extraction
llm: minimax_llm.default
- name: sql_diagnosis
llm: minimax_llm.default
- name: sql_knowledge_retrieval
engine: wren_ibis
document_store: qdrant
---
settings:
engine_timeout: 30
column_indexing_batch_size: 50
table_retrieval_size: 10
table_column_retrieval_size: 100
allow_intent_classification: true
allow_sql_generation_reasoning: true
allow_sql_functions_retrieval: true
enable_column_pruning: false
max_sql_correction_retries: 3
query_cache_maxsize: 1000
query_cache_ttl: 3600
langfuse_host: https://cloud.langfuse.com
langfuse_enable: true
logging_level: DEBUG
development: true
historical_question_retrieval_similarity_threshold: 0.9
sql_pairs_similarity_threshold: 0.7
sql_pairs_retrieval_max_size: 10
instructions_similarity_threshold: 0.7
instructions_top_k: 10
Loading