Skip to content

UIMessageChunks

Namespace: Vercel.AI.AspNetCore

public static class UIMessageChunks

Reads AI SDK UI message chunks, including fields added by a newer server.

Inheritance: object

View source

public static JsonObject Parse(JsonElement value)

Parses one chunk object. Extra properties on a known type are kept.

Parameters

Name Type Description
value JsonElement JSON object for one chunk.

Returns: JsonObject

View source

public static IReadOnlyList<JsonObject> ParseSse(string sse)

Parses data: SSE frames into chunks. data: [DONE] ends the stream.

Parameters

Name Type Description
sse string SSE payload.

Returns: IReadOnlyList<JsonObject>

View source

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product