Developers

Multimodal

API reference

@nlxai/multimodal

Interfaces

Setup

create

create(options): Client

The starting point of the package. Call create to create a multimodal client.

Parameters

NameTypeDescription
optionsConfigconfiguration options for the client

Returns

Client

a multimodal client

Example

1 const client = nlxai.multimodal.create({ 2 // hard-coded params 3 apiKey: "REPLACE_WITH_API_KEY", 4 workspaceId: "REPLACE_WITH_WORKSPACE_ID", 5 journeyId: "REPLACE_WITH_JOURNEY_ID", 6 // dynamic params 7 conversationId: "REPLACE_WITH_CONVERSATION_ID", 8 languageCode: "en-US", 9}); 10 11client.sendStep("REPLACE_WITH_STEP_ID");

Defined in

index.ts:26


Client

Context

Ƭ Context: Record<string, any>

context to send back to the voice bot, for usage later in the intent.

Defined in

index.ts:113

Interfaces

Interface: Client

The multimodal client

Properties

sendStep

sendStep: (stepId: string, context?: Context) => Promise<void>

Example

1 const client = nlxai.multimodal.create({ 2 // hard-coded params 3 apiKey: "REPLACE_WITH_API_KEY", 4 workspaceId: "REPLACE_WITH_WORKSPACE_ID", 5 journeyId: "REPLACE_WITH_JOURNEY_ID", 6 // dynamic params 7 conversationId: "REPLACE_WITH_CONVERSATION_ID", 8 languageCode: "en-US", 9}); 10 11client.sendStep("REPLACE_WITH_STEP_ID", {selectedSeat: "4a"});

sends a step to the voice bot

Type declaration

▸ (stepId, context?): Promise<void>

Parameters
NameTypeDescription
stepIdstringthe next step to transition to. Note: Must be a valid UUID
context?Contextcontext to send back to the voice bot, for usage later in the intent.
Returns

Promise<void>

Defined in

index.ts:106

Interface: Config

Initial configuration used when creating a journey manager

Properties

apiKey

apiKey: string

  • the API key generated for the journey.
Defined in

index.ts:121


journeyId

journeyId: string

the ID of the journey.

Defined in

index.ts:123


workspaceId

workspaceId: string

your workspace id

Defined in

index.ts:126


conversationId

conversationId: string

the conversation id, passed from the active voice bot.

Note: This must be dynamically set by the voice bot.

Defined in

index.ts:133


languageCode

languageCode: string

the user's language code, consistent with the language codes defined on the journey.

Defined in

index.ts:138


debug

Optional debug: boolean

set to true to help debug issues or errors. Defaults to false

Defined in

index.ts:141