Opener

Who even knows how to start a conversation anymore

carter-js provides an opener function which makes use of Carter's opener endpoint. It allows you to begin a conversation without an initial input.

// Assuming you have created a Carter object called carter

const response = await carter.opener('your_user_id', speak) // both optional
if (response.ok) {
    console.log(response.outputText)
}

The response object is identical to a regular CarterInteraction.

speak behaves in the same way as in say() and personalise()

Last updated