🖥️
carter-js V2
  • carter-js
  • 💬Conversation
    • Say
    • Interactions
    • Opener
    • History
  • 🎱Skills
    • Basics
  • Other Features
    • Response Times
    • Personalise
  • More
    • Changelog
    • Further Reading
    • carter-py
Powered by GitBook
On this page
  1. Conversation

Opener

Who even knows how to start a conversation anymore

PreviousInteractionsNextHistory

Last updated 2 years ago

carter-js provides an opener function which makes use of Carter's 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_player_id', speak) // both optional
if (response.ok) {
    console.log(response.data.sentence)
}

The response object is identical to a regular CarterInteraction, except it doesn't include forced behaviours.

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

💬
opener