docs: update Cloudflare provider setup to reflect /connect prompt flow (#20589)
parent
24bdd3c9fb
commit
965c751522
|
|
@ -490,37 +490,42 @@ If you encounter "I'm sorry, but I cannot assist with that request" errors, try
|
||||||
|
|
||||||
Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, and more through a unified endpoint. With [Unified Billing](https://developers.cloudflare.com/ai-gateway/features/unified-billing/) you don't need separate API keys for each provider.
|
Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI, and more through a unified endpoint. With [Unified Billing](https://developers.cloudflare.com/ai-gateway/features/unified-billing/) you don't need separate API keys for each provider.
|
||||||
|
|
||||||
1. Head over to the [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to **AI** > **AI Gateway**, and create a new gateway.
|
1. Head over to the [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to **AI** > **AI Gateway**, and create a new gateway. Note your **Account ID** and **Gateway ID**.
|
||||||
|
|
||||||
2. Set your Account ID and Gateway ID as environment variables.
|
2. Run the `/connect` command and search for **Cloudflare AI Gateway**.
|
||||||
|
|
||||||
```bash title="~/.bash_profile"
|
|
||||||
export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
|
|
||||||
export CLOUDFLARE_GATEWAY_ID=your-gateway-id
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Run the `/connect` command and search for **Cloudflare AI Gateway**.
|
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
/connect
|
/connect
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Enter your Cloudflare API token.
|
3. Enter your **Account ID** when prompted.
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
┌ API key
|
┌ Enter your Cloudflare Account ID
|
||||||
│
|
│
|
||||||
│
|
│
|
||||||
└ enter
|
└ enter
|
||||||
```
|
```
|
||||||
|
|
||||||
Or set it as an environment variable.
|
4. Enter your **Gateway ID** when prompted.
|
||||||
|
|
||||||
```bash title="~/.bash_profile"
|
```txt
|
||||||
export CLOUDFLARE_API_TOKEN=your-api-token
|
┌ Enter your Cloudflare AI Gateway ID
|
||||||
|
│
|
||||||
|
│
|
||||||
|
└ enter
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Run the `/models` command to select a model.
|
5. Enter your **Cloudflare API token**.
|
||||||
|
|
||||||
|
```txt
|
||||||
|
┌ Gateway API token
|
||||||
|
│
|
||||||
|
│
|
||||||
|
└ enter
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Run the `/models` command to select a model.
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
/models
|
/models
|
||||||
|
|
@ -542,27 +547,38 @@ Cloudflare AI Gateway lets you access models from OpenAI, Anthropic, Workers AI,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternatively, you can set environment variables instead of using `/connect`.
|
||||||
|
|
||||||
|
```bash title="~/.bash_profile"
|
||||||
|
export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
|
||||||
|
export CLOUDFLARE_GATEWAY_ID=your-gateway-id
|
||||||
|
export CLOUDFLARE_API_TOKEN=your-api-token
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Cloudflare Workers AI
|
### Cloudflare Workers AI
|
||||||
|
|
||||||
Cloudflare Workers AI lets you run AI models on Cloudflare's global network directly via REST API, with no separate provider accounts needed for supported models.
|
Cloudflare Workers AI lets you run AI models on Cloudflare's global network directly via REST API, with no separate provider accounts needed for supported models.
|
||||||
|
|
||||||
1. Head over to the [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to **Workers AI**, and select **Use REST API** to get your Account ID and create an API token.
|
1. Head over to the [Cloudflare dashboard](https://dash.cloudflare.com/), navigate to **Workers AI**, and select **Use REST API** to get your **Account ID** and create an API token.
|
||||||
|
|
||||||
2. Set your Account ID as an environment variable.
|
2. Run the `/connect` command and search for **Cloudflare Workers AI**.
|
||||||
|
|
||||||
```bash title="~/.bash_profile"
|
|
||||||
export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Run the `/connect` command and search for **Cloudflare Workers AI**.
|
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
/connect
|
/connect
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Enter your Cloudflare API token.
|
3. Enter your **Account ID** when prompted.
|
||||||
|
|
||||||
|
```txt
|
||||||
|
┌ Enter your Cloudflare Account ID
|
||||||
|
│
|
||||||
|
│
|
||||||
|
└ enter
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Enter your **Cloudflare API key**.
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
┌ API key
|
┌ API key
|
||||||
|
|
@ -571,18 +587,19 @@ Cloudflare Workers AI lets you run AI models on Cloudflare's global network dire
|
||||||
└ enter
|
└ enter
|
||||||
```
|
```
|
||||||
|
|
||||||
Or set it as an environment variable.
|
|
||||||
|
|
||||||
```bash title="~/.bash_profile"
|
|
||||||
export CLOUDFLARE_API_KEY=your-api-token
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Run the `/models` command to select a model.
|
5. Run the `/models` command to select a model.
|
||||||
|
|
||||||
```txt
|
```txt
|
||||||
/models
|
/models
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternatively, you can set environment variables instead of using `/connect`.
|
||||||
|
|
||||||
|
```bash title="~/.bash_profile"
|
||||||
|
export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
|
||||||
|
export CLOUDFLARE_API_KEY=your-api-token
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### Cortecs
|
### Cortecs
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue