Table of Contents

Class InteractionSseEvent

Namespace
GenerativeAI.Types
Assembly
GenerativeAI.dll

A Server-Sent Event of a streamed interaction, discriminated by event_type. Unknown event types are read as UnknownInteractionSseEvent.

[JsonConverter(typeof(InteractionSseEventConverter))]
public abstract class InteractionSseEvent
Inheritance
InteractionSseEvent
Derived
Inherited Members
Extension Methods

Constructors

InteractionSseEvent(string)

Initializes a new event with the given discriminator.

protected InteractionSseEvent(string eventType)

Parameters

eventType string

The event_type discriminator.

Properties

EventId

Token that identifies this event; pass it as lastEventId to resume the stream after this event.

[JsonPropertyName("event_id")]
public string? EventId { get; set; }

Property Value

string

EventType

The event type (see InteractionEventTypes).

[JsonPropertyName("event_type")]
public string EventType { get; }

Property Value

string

ExtensionData

Fields returned by the API that this SDK does not model yet.

[JsonExtensionData]
public Dictionary<string, JsonElement>? ExtensionData { get; set; }

Property Value

Dictionary<string, JsonElement>