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
Name | Type | Description |
---|---|---|
options | Config | configuration options for the client |
Returns
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
Client
Context
Ƭ Context: Record
<string
, any
>
context to send back to the voice bot, for usage later in the intent.
Defined in
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
Name | Type | Description |
---|---|---|
stepId | string | the next step to transition to. Note: Must be a valid UUID |
context? | Context | context to send back to the voice bot, for usage later in the intent. |
Returns
Promise
<void
>
Defined in
Interface: Config
Initial configuration used when creating a journey manager
Properties
apiKey
• apiKey: string
- the API key generated for the journey.
Defined in
journeyId
• journeyId: string
the ID of the journey.
Defined in
workspaceId
• workspaceId: string
your workspace id
Defined in
conversationId
• conversationId: string
the conversation id, passed from the active voice bot.
Note: This must be dynamically set by the voice bot.
Defined in
languageCode
• languageCode: string
the user's language code, consistent with the language codes defined on the journey.
Defined in
debug
• Optional
debug: boolean
set to true to help debug issues or errors. Defaults to false
Defined in
- Previous
- Multimodal: Usage