UIMessageChunks
Namespace: Vercel.AI.AspNetCore
public static class UIMessageChunksReads AI SDK UI message chunks, including fields added by a newer server.
Inheritance: object
Methods
Section titled “Methods”Parse(JsonElement)
Section titled “Parse(JsonElement)”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
ParseSse(string)
Section titled “ParseSse(string)”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>
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product