@openfloor/protocol - v0.0.4
    Preparing search index...

    Class DialogEvent

    Represents a dialog event according to the Open Floor specification. Dialog events capture linguistic events with features, timing, and speaker information.

    // Simple text dialog event
    const event = new DialogEvent({
    speakerUri: 'tag:example.com,2025:user1',
    features: {
    text: { mimeType: 'text/plain', tokens: [{ value: 'Hello world' }] }
    }
    });

    // Dialog event with timing and context
    const event2 = new DialogEvent({
    speakerUri: 'tag:example.com,2025:agent1',
    span: { startTime: new Date() },
    features: {
    text: { mimeType: 'text/plain', tokens: [{ value: 'How can I help?' }] }
    },
    context: 'Greeting response'
    });

    Implements

    Index

    Constructors

    • Creates a new DialogEvent instance

      Parameters

      • options: DialogEventOptions

        DialogEvent configuration options

      Returns DialogEvent

      Error if required parameters are missing

    Properties

    context?: string
    features: ReadonlyMap<string, Feature>
    id: string
    previousId?: string
    span: Span
    speakerUri: string

    Methods

    • Creates a DialogEvent instance from a dictionary with nested object conversion

      Parameters

      • data: Record<string, unknown>

      Returns DialogEvent