# CloudflareWorkersAI

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/llms/cloudflare_workersai/CloudflareWorkersAI)

Cloudflare Workers AI service.

To use, you must provide an API token and
account ID to access Cloudflare Workers AI, and
pass it as a named parameter to the constructor.

## Signature

```python
CloudflareWorkersAI(
    self,
    **kwargs: Any = {},
)
```

## Description

**Example:**

.. code-block:: python

from langchain_community.llms.cloudflare_workersai import CloudflareWorkersAI

my_account_id = "my_account_id"
my_api_token = "my_secret_api_token"
llm_model =  "@cf/meta/llama-2-7b-chat-int8"

cf_ai = CloudflareWorkersAI(
    account_id=my_account_id,
    api_token=my_api_token,
    model=llm_model
)

## Extends

- `LLM`

## Constructors

```python
__init__(
    self,
    **kwargs: Any = {},
) -> None
```


## Properties

- `account_id`
- `api_token`
- `model`
- `base_url`
- `streaming`
- `endpoint_url`

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/llms/cloudflare_workersai.py#L13)