Skip to content

feat: add MiniMax as alternative LLM provider for video chat#265

Open
octo-patch wants to merge 1 commit intoOpenGVLab:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax as alternative LLM provider for video chat#265
octo-patch wants to merge 1 commit intoOpenGVLab:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Add MiniMax M2.7 as an alternative LLM provider for the video_chat_with_ChatGPT component. Users can now choose between OpenAI GPT-4 and MiniMax M2.7 via a Gradio dropdown or the LLM_PROVIDER environment variable.

Changes

  • chatbot.py: Add create_llm() factory function with LLM_PROVIDERS registry. MiniMax uses ChatOpenAI with OpenAI-compatible API endpoint, temperature clamping to (0.01, 1.0]
  • app.py: Add LLM Provider dropdown in Gradio UI, safer os.environ.get() for API key
  • README.md: Add MiniMax to the provider list
  • video_chat_with_ChatGPT/README.md: Add MiniMax setup instructions
  • tests/: 25 unit tests + 3 integration tests

Why MiniMax?

MiniMax M2.7 provides a high-quality, cost-effective alternative to GPT-4 for text reasoning about video descriptions. It supports an OpenAI-compatible API, making integration seamless.

Test Plan

  • 25 unit tests pass (provider registry, create_llm factory, temperature clamping, init_agent with both providers, env var fallback)
  • 3 integration tests pass against live MiniMax API (create LLM, chat completion, M2.7-highspeed model)
  • Manual testing with Gradio UI

Add MiniMax M2.7 as an alternative LLM provider alongside OpenAI GPT-4
in the video_chat_with_ChatGPT component. MiniMax offers an OpenAI-compatible
API, enabling users to choose between providers via a Gradio dropdown or
the LLM_PROVIDER environment variable.

Changes:
- chatbot.py: add create_llm() factory with LLM_PROVIDERS registry,
  ChatOpenAI-based MiniMax integration with temperature clamping
- app.py: add LLM Provider dropdown, configurable API key input
- README.md: add MiniMax to the provider list in main README
- video_chat_with_ChatGPT/README.md: add MiniMax setup instructions
- tests/: 25 unit tests + 3 integration tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant