Skip to content

Commit 2c52128

Browse files
committed
revert
1 parent c087b0a commit 2c52128

File tree

6 files changed

+16
-419
lines changed

6 files changed

+16
-419
lines changed

src/content/docs/ai-gateway/configuration/Websockets-api/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
title: WebSockets API
33
pcx_content_type: configuration
4+
sidebar:
5+
group:
6+
badge: Beta
47
---
58

69
The AI Gateway WebSockets API provides a persistent connection for AI interactions, eliminating repeated handshakes and reducing latency. This API is divided into two categories:

src/content/docs/ai-gateway/configuration/Websockets-api/realtime-api.mdx

Lines changed: 0 additions & 133 deletions
This file was deleted.
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
---
2+
title: WebSockets API
23
pcx_content_type: configuration
3-
title: Non-realtime WebSockets API
44
sidebar:
5-
order: 2
5+
badge:
6+
text: Beta
67
---
78

8-
The Non-realtime WebSockets API allows you to establish persistent connections for AI requests without requiring repeated handshakes. This approach is ideal for applications that do not require real-time interactions but still benefit from reduced latency and continuous communication.
9+
The AI Gateway WebSockets API provides a single persistent connection, enabling continuous communication. By using WebSockets, you can establish a single connection for multiple AI requests, eliminating the need for repeated handshakes and TLS negotiations, which enhances performance and reduces latency. This API supports all AI providers connected to AI Gateway, including those that do not natively support WebSockets.
10+
11+
## When to use WebSockets?
12+
13+
WebSockets are long-lived TCP connections that enable bi-directional, real-time communication between client and server. Unlike HTTP connections, which require repeated handshakes for each request, WebSockets maintain the connection, supporting continuous data exchange with reduced overhead. WebSockets are ideal for applications needing low-latency, real-time data, such as voice assistants.
14+
15+
## Key benefits
16+
17+
- **Reduced Overhead**: Avoid overhead of repeated handshakes and TLS negotiations by maintaining a single, persistent connection.
18+
- **Provider Compatibility**: Works with all AI providers in AI Gateway. Even if your chosen provider does not support WebSockets, we handle it for you, managing the requests to your preferred AI provider.
919

1020
## Set up WebSockets API
1121

src/content/docs/ai-gateway/configuration/websockets-api/index.mdx

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

src/content/docs/ai-gateway/configuration/websockets-api/non-realtime-api.mdx

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

0 commit comments

Comments
 (0)