Skip to content

EventSourceMessage

Namespace: Vercel.AI.ProviderUtils

public sealed class EventSourceMessage

One Server-Sent Event. Field names are compared without case folding.

Inheritance: object

View source

EventSourceMessage(string, string?, string?)

Section titled “EventSourceMessage(string, string?, string?)”
public EventSourceMessage(string data, string? eventType, string? id)

Creates a message.

Parameters

Name Type Description
data string
eventType string
id string

View source

public string Data { get; }

Joined data fields.

Value: string

View source

public string? Event { get; }

Event type. Null when the stream did not set one.

Value: string

View source

public string? Id { get; }

Event id. Null when the stream did not set one.

Value: string

View source

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