Conversation\<TInput, TOutput>

A conversation between an Application and its conversational partner.

Extends

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

Type Parameters

• TInput extends Record<string, unknown> = Record<string, unknown>

• TOutput extends Record<string, unknown> = Record<string, unknown>

Properties

audio


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

Methods

execute()

execute(options?): 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

options?

cancelToken

channel

"text" | "audio"

Default

"audio"

Returns

Promise<ConversationResult<TOutput>>


sendEvent()

sendEvent(eventName, eventValue): Promise<void>

Parameters

eventName

string

eventValue

Record<string, string>

Returns

Promise<void>


setDynamicTool()

setDynamicTool<T>(options, handler): void

Type Parameters

• T extends TSchema

Parameters

options

DynamicToolScheme<T>

handler

(args, conv) => unknown

Returns

void


setDynamicToolRaw()

setDynamicToolRaw(options, handler): void

Parameters

options

DynamicToolDescription

handler

(args, conv) => unknown

Returns

void

Found a mistake? Let us know.

Enroll in beta

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