-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(wren-ai-service): add MiniMax as a first-class LLM provider with M2.7 default #2158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
octo-patch
wants to merge
3
commits into
Canner:main
Choose a base branch
from
octo-patch:feature/add-minimax-provider
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
202 changes: 202 additions & 0 deletions
202
wren-ai-service/docs/config_examples/config.minimax.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
| # 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 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
📝 Committable suggestion
🤖 Prompt for AI Agents