ChatCloudflareWorkersAI chat models. For detailed documentation of all ChatCloudflareWorkersAI features and configurations head to the API reference.
概述
集成详情
模型功能
请参阅下表标题中的链接,了解如何使用特定功能。设置
要访问 Cloudflare Workers AI models,你需要create a Cloudflare account, get an API key, and install the@langchain/cloudflare integration package.
凭证
Head to this page to sign up to Cloudflare and generate an API key. Once you’ve done this, note yourCLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN.
Passing a binding within a Cloudflare Worker is not yet supported.
安装
LangChain 的 ChatCloudflareWorkersAI 集成位于@langchain/cloudflare 包中:
实例化
现在我们可以实例化模型对象并生成聊天补全:调用
API 参考
有关所有ChatCloudflareWorkersAI 功能和配置的详细文档,请前往 API 参考。
将这些文档连接到 Claude、VSCode 等工具,通过 MCP 获取实时答案。

