Minimax는 기업과 개인을 위한 자연어 처리 모델을 제공하는 중국의 스타트업입니다. 이 예제는 LangChain을 사용하여 Minimax와 상호작용하는 방법을 보여줍니다.

Setup

이 노트북을 실행하려면 Minimax 계정, API key, 그리고 Group ID가 필요합니다.

Single model call

from langchain_community.llms import Minimax
# Load the model
minimax = Minimax(minimax_api_key="YOUR_API_KEY", minimax_group_id="YOUR_GROUP_ID")
# Prompt the model
minimax("What is the difference between panda and bear?")

Chained model calls

# get api_key and group_id: https://api.minimax.chat/user-center/basic-information
# We need `MINIMAX_API_KEY` and `MINIMAX_GROUP_ID`

import os

os.environ["MINIMAX_API_KEY"] = "YOUR_API_KEY"
os.environ["MINIMAX_GROUP_ID"] = "YOUR_GROUP_ID"
from langchain.chains import LLMChain
from langchain_community.llms import Minimax
from langchain_core.prompts import PromptTemplate
template = """Question: {question}

Answer: Let's think step by step."""

prompt = PromptTemplate.from_template(template)
llm = Minimax()
llm_chain = LLMChain(prompt=prompt, llm=llm)
question = "What NBA team won the Championship in the year Jay Zhou was born?"

llm_chain.run(question)

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.
I