🖥️
carter-js V3
  • carter-js
  • 💬Conversation
    • Say
    • Interactions
    • Opener
    • History
    • Speak
  • 🎱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.outputText)
}

The response object is identical to a regular CarterInteraction.

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

💬
opener