Anthropic
Anthropic 是一家 AI 安全与研究公司,也是
Claude的创建者。 本页面涵盖了Anthropic模型与LangChain之间的所有集成。
安装与设置
要使用 Anthropic 模型,您需要安装一个 Python 包:
pip install -U langchain-anthropic
您需要设置 ANTHROPIC_API_KEY 环境变量。
您可以在此处获取您的 Anthropic API 密钥。
Chat 模型
ChatAnthropic
请参阅用法示例。
from langchain_anthropic import ChatAnthropic
model = ChatAnthropic(model='claude-3-opus-20240229')
API Reference:ChatAnthropic