feat: add MiniMax as cloud LLM provider#165
Open
octo-patch wants to merge 1 commit intoX-D-Lab:masterfrom
Open
feat: add MiniMax as cloud LLM provider#165octo-patch wants to merge 1 commit intoX-D-Lab:masterfrom
octo-patch wants to merge 1 commit intoX-D-Lab:masterfrom
Conversation
Add MiniMax M2.7 and M2.7-highspeed as cloud LLM options alongside existing local models (ChatGLM, BELLE, Vicuna, InternLM, Yuan2). - New minimax_llm.py: ChatMiniMaxLLM class extending LangChain LLM, using MiniMax OpenAI-compatible API with temperature clamping and think-tag stripping - Updated config.py: added MiniMax model entries to llm_model_dict (also fixed missing comma syntax error between internlm and yuan2) - Updated app.py: MiniMax model type detection in init_model_config, uses ChatMiniMaxLLM for cloud inference (no GPU required) - Updated requirements.txt: added openai>=1.0.0 dependency - Updated README.md: added MiniMax models to supported models table with usage instructions - Added tests/test_minimax_llm.py: 21 unit tests + 3 integration tests covering init, API calls, temp clamping, history, think-tag stripping Usage: set MINIMAX_API_KEY env var, then select MiniMax-M2.7 or MiniMax-M2.7-highspeed from the model dropdown in the web UI.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Add MiniMax M2.7 and M2.7-highspeed as cloud LLM providers alongside existing local models (ChatGLM, BELLE, Vicuna, InternLM, Yuan2). This enables users without GPU hardware to use the knowledge-based QA system via MiniMax's cloud API.
Changes
ChatMiniMaxLLMclass extending LangChainLLM, using MiniMax OpenAI-compatible API (https://api.minimax.io/v1) with temperature clamping to (0, 1] and think-tag strippingMiniMax-M2.7,MiniMax-M2.7-highspeed) tollm_model_dict; fixed missing comma syntax errorinit_model_config()— usesChatMiniMaxLLMfor cloud inference, skipping local model loadingopenai>=1.0.0dependencyUsage
Test Plan