Open History to see the last commit
1---
2id: resumeWebSocketStream
3title: resumeWebSocketStream
4---
5
6```ts
7function resumeWebSocketStream<TOffset>(socket, options): void;
8```
9
10Defined in: packages/ai/src/stream-to-websocket.ts:307
11
12Read-only replay of a run's durability log over a socket (mirrors
13`resumeServerSentEventsResponse`). The adapter captures the offset from the
14request (`?offset`/`Last-Event-ID`); no model runs. Closes 1008 when there
15is nothing to resume.
16
17## Type Parameters
18
19### TOffset
20
21`TOffset` *extends* `string` = `string`
22
23## Parameters
24
25### socket
26
27[`WebSocketLike`](../interfaces/WebSocketLike.md)
28
29### options
30
31#### adapter
32
33[`StreamDurability`](../interfaces/StreamDurability.md)\<`TOffset`\>
34
35#### batch?
36
37`number`
38
39#### debug?
40
41[`DebugOption`](../type-aliases/DebugOption.md)
42
43## Returns
44
45`void`