Add MiniMax as alternative LLM provider in research agent notebook#595
Open
octo-patch wants to merge 1 commit intosuperlinked:mainfrom
Open
Add MiniMax as alternative LLM provider in research agent notebook#595octo-patch wants to merge 1 commit intosuperlinked:mainfrom
octo-patch wants to merge 1 commit intosuperlinked:mainfrom
Conversation
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
The
research_ai_agent.ipynbnotebook was hardcoded to use OpenAI (GPT-4). This PR adds MiniMax as a drop-in alternative provider, switchable via an environment variable.MiniMax exposes an OpenAI-compatible REST API, so no extra dependencies are needed — the existing
openaiSDK works with just a differentbase_urland API key.Changes
docs/assets/use_cases/research_agent/research_ai_agent.ipynbPROVIDER = os.environ.get("LLM_PROVIDER", "openai"))MiniMax-M2.7with a 204K-token context windowUsage
OpenAI (default — no change needed):
OPENAI_API_KEY=sk-... # as beforeMiniMax:
LLM_PROVIDER=minimax MINIMAX_API_KEY=your-key # from https://www.minimaxi.com/In Colab, add the relevant key via Tools → Secrets and set
LLM_PROVIDERin an early cell or as an environment variable.Why MiniMax?
MiniMax-M2.7has a 204K-token context window, useful when ingesting large research paper corpora