Skip to content

Debugging

Since building a voice bot with multiple stages can be error prone, it is possible to inspect the bot state using the call transcript/chat history as well as the web hook logs.

Inspecting Bot State and Stack

In the call transcript/chat history, the state as well as the stack can be inspected with every conversation turn as shown below:

In addition to the state and stack, the debugging view shows also all called functions and their passed parameters as well as what they have returned when moving with the mouse over it. By clicking on the function or webhook calls, these can be inspected further in the web hook logs as shown below:

Logging Custom Messages

In addition to the inspection of the state and stack, it is also possible to perform custom logging in order to trace back issues. To use message logging, call in any Javascript function the log() function as shown below:

function myFunc(params) {
    log(params);
    return ({ "text": "Today is " + new Date().toLocaleString() });
}

The logged message will then appear in the web hook logs for function calls.