Skip to content

Commit a669e20

Browse files
author
Tarush
committed
[AI Gateway] Restructure sidebar and add new features
1 parent 383b078 commit a669e20

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+371
-76
lines changed

public/__redirects

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2250,3 +2250,8 @@
22502250

22512251
# Calls
22522252
/calls/* /realtime/:splat 301
2253+
2254+
# AI Gateway
2255+
/ai-gateway/providers/* /ai-gateway/usage/providers/:splat 301
2256+
/ai-gateway/guardrails/* /ai-gateway/features/guardrails/:splat 301
2257+
/ai-gateway/websockets-api/* /ai-gateway/usage/websockets-api/:splat 301

src/content/docs/ai-gateway/bring-your-own-keys.mdx renamed to src/content/docs/ai-gateway/configuration/bring-your-own-keys.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,19 @@ This approach offers several key benefits:
2222
## How it works
2323

2424
With BYOK enabled, your workflow changes from:
25-
{/* TODO UPDATE THE USAGE HERE TO UNIVERSAL */}
2625

2726
1. **Traditional approach**: Include API key in every request header
2827

2928
```bash
30-
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_slug}/openai/chat/completions \
29+
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/openai/chat/completions \
3130
-H "Authorization: Bearer YOUR_OPENAI_API_KEY" \
3231
-H "Content-Type: application/json" \
3332
-d '{"model": "gpt-4", "messages": [...]}'
3433
```
3534

3635
2. **BYOK approach**: Configure key once in dashboard, make requests without exposing keys
3736
```bash
38-
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_slug}/openai/chat/completions \
37+
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/openai/chat/completions \
3938
-H "Content-Type: application/json" \
4039
-d '{"model": "gpt-4", "messages": [...]}'
4140
```

src/content/docs/ai-gateway/configuration/fallbacks.mdx

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/content/docs/ai-gateway/configuration/request-handling.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ sidebar:
77

88
import { Render, Aside } from "~/components";
99

10+
:::note[Deprecated]
11+
12+
While the request handling features described on this page still work, [Dynamic Routing](/ai-gateway/features/dynamic-routing/) is now the preferred way to achieve advanced request handling, including timeouts, retries, and fallbacks. Dynamic Routing provides a more powerful and flexible approach with a visual interface for managing complex routing scenarios.
13+
14+
:::
15+
1016
Your AI gateway supports different strategies for handling requests to providers, which allows you to manage AI interactions effectively and ensure your applications remain responsive and reliable.
1117

1218
## Request timeouts

src/content/docs/ai-gateway/evaluations/add-human-feedback-api.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pcx_content_type: how-to
33
title: Add Human Feedback using API
44
sidebar:
55
order: 4
6+
hidden: true
67
---
78

89
import { APIRequest } from "~/components";

src/content/docs/ai-gateway/evaluations/add-human-feedback-bindings.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pcx_content_type: how-to
33
title: Add human feedback using Worker Bindings
44
sidebar:
55
order: 4
6+
hidden: true
67
---
78

89
This guide explains how to provide human feedback for AI Gateway evaluations using Worker bindings.

src/content/docs/ai-gateway/evaluations/add-human-feedback.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pcx_content_type: how-to
33
title: Add Human Feedback using Dashboard
44
sidebar:
55
order: 3
6+
hidden: true
67
---
78

89
Human feedback is a valuable metric to assess the performance of your AI models. By incorporating human feedback, you can gain deeper insights into how the model's responses are perceived and how well it performs from a user-centric perspective. This feedback can then be used in evaluations to calculate performance metrics, driving optimization and ultimately enhancing the reliability, accuracy, and efficiency of your AI application.

src/content/docs/ai-gateway/evaluations/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ title: Evaluations
33
pcx_content_type: navigation
44
order: 1
55
sidebar:
6-
order: 7
6+
order: 100
77
group:
88
badge: Beta
9+
hidden: true
910
---
1011

1112
Understanding your application's performance is essential for optimization. Developers often have different priorities, and finding the optimal solution involves balancing key factors such as cost, latency, and accuracy. Some prioritize low-latency responses, while others focus on accuracy or cost-efficiency.

src/content/docs/ai-gateway/evaluations/set-up-evaluations.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pcx_content_type: how-to
33
title: Set up Evaluations
44
sidebar:
55
order: 2
6+
hidden: true
67
---
78

89
This guide walks you through the process of setting up an evaluation in AI Gateway. These steps are done in the [Cloudflare dashboard](https://dash.cloudflare.com/).
File renamed without changes.

0 commit comments

Comments
 (0)