Skip to main content

MoonshotChat

Moonshot 是一家提供 LLM 服务的中国初创公司,面向企业和个人。

本示例介绍如何使用 LangChain 与 Moonshot 进行交互。

from langchain_community.llms.moonshot import Moonshot
import os

# 从以下网址生成您的 API 密钥: https://platform.moonshot.cn/console/api-keys
os.environ["MOONSHOT_API_KEY"] = "MOONSHOT_API_KEY"
llm = Moonshot()
# 或使用特定模型
# 可用模型: https://platform.moonshot.cn/docs
# llm = Moonshot(model="moonshot-v1-128k")
# 提示模型
llm.invoke("What is the difference between panda and bear?")

相关


此页面是否有帮助?


您还可以留下详细的反馈 在 GitHub 上