Sfoglia il codice sorgente

docs: update Cloudflare provider setup to reflect /connect prompt flow (#20589)

MC 6 mesi fa
parent
commit
965c751522
1 ha cambiato i file con 43 aggiunte e 26 eliminazioni
  1. 43 26
      packages/web/src/content/docs/providers.mdx

+ 43 - 26
packages/web/src/content/docs/providers.mdx

@@ -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
+   ```txt
+   /connect
    ```
    ```
 
 
-3. Run the `/connect` command and search for **Cloudflare AI Gateway**.
+3. Enter your **Account ID** when prompted.
 
 
    ```txt
    ```txt
-   /connect
+   ┌ Enter your Cloudflare Account ID
+   │
+   │
+   └ enter
    ```
    ```
 
 
-4. Enter your Cloudflare API token.
+4. Enter your **Gateway ID** when prompted.
 
 
    ```txt
    ```txt
-   ┌ API key
+   ┌ Enter your Cloudflare AI Gateway ID
    │
    │
    │
    │
    └ enter
    └ enter
    ```
    ```
 
 
-   Or set it as an environment variable.
+5. Enter your **Cloudflare API token**.
 
 
-   ```bash title="~/.bash_profile"
-   export CLOUDFLARE_API_TOKEN=your-api-token
+   ```txt
+   ┌ Gateway API token
+   │
+   │
+   └ enter
    ```
    ```
 
 
-5. Run the `/models` command to select a model.
+6. Run the `/models` command to select a model.
 
 
    ```txt
    ```txt
    /models
    /models
@@ -542,39 +547,44 @@ 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.
-
-2. Set your Account ID as an environment variable.
+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.
 
 
-   ```bash title="~/.bash_profile"
-   export CLOUDFLARE_ACCOUNT_ID=your-32-character-account-id
-   ```
-
-3. Run the `/connect` command and search for **Cloudflare Workers AI**.
+2. 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
    ```txt
-   ┌ API key
+   ┌ Enter your Cloudflare Account ID
    │
    │
    │
    │
    └ enter
    └ enter
    ```
    ```
 
 
-   Or set it as an environment variable.
+4. Enter your **Cloudflare API key**.
 
 
-   ```bash title="~/.bash_profile"
-   export CLOUDFLARE_API_KEY=your-api-token
+   ```txt
+   ┌ API key
+   │
+   │
+   └ enter
    ```
    ```
 
 
 5. Run the `/models` command to select a model.
 5. Run the `/models` command to select a model.
@@ -583,6 +593,13 @@ Cloudflare Workers AI lets you run AI models on Cloudflare's global network dire
    /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