MoonshotChat
Moonshot 是一家中國新創公司,為企業和個人提供 LLM 服務。
本範例說明如何使用 LangChain 與 Moonshot 互動。
from langchain_community.llms.moonshot import Moonshot
API 參考文件:Moonshot
import os
# Generate your api key from: https://platform.moonshot.cn/console/api-keys
os.environ["MOONSHOT_API_KEY"] = "MOONSHOT_API_KEY"
llm = Moonshot()
# or use a specific model
# Available models: https://platform.moonshot.cn/docs
# llm = Moonshot(model="moonshot-v1-128k")
# Prompt the model
llm.invoke("What is the difference between panda and bear?")