Conversation<TInput, TOutput>
A conversation between an Application and its conversational partner.
Type parameters
Name | Type | Default |
---|---|---|
TInput | Record<string, unknown> | Record<string, unknown> |
TOutput | Record<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:
Name | Type |
---|---|
options? | object |
options.cancelToken? | CancelToken |
options.channel? | "text" | "audio" |
Returns: Promise<ConversationResult<TOutput>>