Open History to see the last commit
1---
2id: decodeWsFrame
3title: decodeWsFrame
4---
5
6```ts
7function decodeWsFrame(data): InboundFrame;
8```
9
10Defined in: packages/ai/src/stream-to-websocket.ts:48
11
12Decode one client→server frame. An `{ type: 'abort', runId }` object is a
13control frame; anything else is treated as a `RunAgentInput` and validated
14downstream by `chatParamsFromRequestBody`.
15
16## Parameters
17
18### data
19
20`string`
21
22## Returns
23
24[`InboundFrame`](../type-aliases/InboundFrame.md)