Overview
Integration details
| Class | Package | Local | Serializable | JS support | Downloads | Version |
|---|---|---|---|---|---|---|
| ChatCloudflareWorkersAI | langchain-cloudflare | ✅ | ❌ | ❌ |
Model features
| Tool calling | Structured output | JSON mode | Image input | Audio input | Video input | Token-level streaming | Native async | Token usage | Logprobs |
|---|---|---|---|---|---|---|---|---|---|
| ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ |
Setup
CloudflareWorkersAI 모델에 액세스하려면 CloudflareWorkersAI 계정을 생성하고 API 키를 받은 다음langchain-cloudflare integration package를 설치해야 합니다.
Credentials
www.cloudflare.com/developer-platform/products/workers-ai/로 이동하여 CloudflareWorkersAI에 가입하고 API 키를 생성하세요. 완료한 후 CF_AI_API_KEY environment variable과 CF_ACCOUNT_ID environment variable을 설정하세요:Installation
LangChain CloudflareWorkersAI integration은langchain-cloudflare package에 있습니다:
Instantiation
이제 모델 객체를 인스턴스화하고 chat completion을 생성할 수 있습니다:- 관련 매개변수로 모델 인스턴스화를 업데이트하세요.
Invocation
Structured Outputs
Bind tools
API reference
developers.cloudflare.com/workers-ai/ developers.cloudflare.com/agents/Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.