Minimax is a Chinese startup that provides natural language processing models for companies and individuals.This example demonstrates using LangChain to interact with Minimax.
# get api_key and group_id: https://api.minimax.chat/user-center/basic-information# We need `MINIMAX_API_KEY` and `MINIMAX_GROUP_ID`import osos.environ["MINIMAX_API_KEY"] = "YOUR_API_KEY"os.environ["MINIMAX_GROUP_ID"] = "YOUR_GROUP_ID"
Copy
Ask AI
from langchain.chains import LLMChainfrom langchain_community.llms import Minimaxfrom langchain_core.prompts import PromptTemplate