Conversation<TInput, TOutput>

A conversation between an Application and its conversational partner.

Type parameters

NameTypeDefault
TInputRecord<string, unknown>Record<string, unknown>
TOutputRecord<string, unknown>Record<string, unknown>

Hierarchy

  • EventEmitter<{ debugLog: [event: unknown] ; transcription: [transcription: Transcription] }>

    Conversation

Implemented by

Properties

audio

audio: AudioConfig


input

input: TInput

The input data to be passed as the input context of a DashaScript application.


jobId

Readonly jobId: string


jobKey

Readonly jobKey: string


log

Readonly log: Logger


sip

sip: SipConfig

Methods

execute

execute(options?: { cancelToken?: CancelToken ; channel?: "text" | "audio" }): Promise<ConversationResult<TOutput>>

Start a conversation, i.e. run the DashaScript code on a specified input.

Returns a promise that settles when the conversation has finished. It rejects on errors, and resolves on successful completion.

Parameters:

NameType
options?object
options.cancelToken?CancelToken
options.channel?"text" | "audio"

Returns: Promise<ConversationResult<TOutput>>

Found a mistake? Email us, and we'll send you a free t-shirt!

Enroll in beta

Request invite to our private Beta program for developers to join the waitlist. No spam, we promise.