Skip to content

Commit 4c148f2

Browse files
Update changelogs from fern repo (#1843)
Co-authored-by: tstanmay13 <[email protected]>
1 parent 833bba8 commit 4c148f2

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## 3.14.0
2+
**`(feat):`** Add support for WebSocket channels with bidirectional communication. Generated WebSocket clients
3+
provide automatic reconnection with exponential backoff, strongly-typed message handlers, and message
4+
queuing during disconnections. Clients are accessible via factory methods in subpackage clients.
5+
6+
```java
7+
// Create WebSocket client with path and query parameters
8+
RealtimeWebSocketClient ws = client.realtime().realtimeWebSocket(
9+
"session-123",
10+
Optional.of("gpt-4"),
11+
Optional.of(0)
12+
);
13+
14+
// Register handlers and connect
15+
ws.onReceive(message -> System.out.println("Received: " + message.getAlpha()));
16+
ws.onConnected(() -> System.out.println("Connected!"));
17+
ws.connect().get();
18+
19+
// Send typed messages
20+
ws.sendSend(SendEvent.builder()
21+
.sendText("Hello WebSocket!")
22+
.sendParam(42)
23+
.build());
24+
```
25+
26+

0 commit comments

Comments
 (0)