Scenarios

Scenarios are a powerful way to define actions and events, either for storytelling or to better support your app or scene.

Scenarios are backed by Stages, which are very similar to scenarios.

  • Stage: Integration capabilities of the application or scene. For example, if the character is in a room and can sit down or stand up, the stage would define the actions, when they can happen, and how to inform the AI.
  • Scenario: Defines the situation in which the character finds themselves. For example, while the stage states that the character can stand up or sit down, the scenario would define that the character is in a virtual room, meeting the user for the first time. Scenarios can also define their own actions, as well as define events to do drive roleplay or storytelling.

For example, if you are building your own application, you may want to make a Stage to map all of your application capabilities (standing up, sitting down, etc.) and use Scenario to define the situation in which the character and the user finds themselves (you are a desktop avatar, etc.).

Tabs

General

  • Stage (Scenarios Only): In Scenarios, you can specify the stage in which your scenario happens. When the app lists available scenarios, it will only list the ones that matches its stage. Scenarios that define a stage MUST have the exact same list of roles as the stage.
  • Chat Flow (Scenarios Only): Chat is the normal mode in which you and one or multiple avatars can discuss. Story excludes the user completely from the conversation.
  • Attached Memory Book (Scenarios Only): Provides additional information about the world for this scenario.
  • Narrator (Scenarios Only): The narrator is the voice used to read events.
  • App (Stages Only): The app that this stage is for. This is what allows a given stage to be provided as an option for apps that supports more than one stage (e.g. Virt-A-Mate).

Roles

Roles are placeholders for characters in chats. You can assign characters to roles in scenarios, and optionally disable them by default (for example, when you want to introduce some characters later following an event).

The Name of the role is important, it will be used to reference your role in templates. You can either use {{ char }} to specific the first role, or {{ scenario_roles.your_role_name }} to refer to the name of a character assigned to that role.

Scenario

Scenario Template

The Scenario field is a template used to override the character’s template. If not set, the first character’s scenario will be used.

Bootstrap Messages

The Boostrap Messages is used to kickstart the chat, and override the character’s greeting. Here is a list of all possible messages you can create. See Messages for more information on the different type of messages.

{{ char }}: The first character
{{ user }}: The user
{{ scenario_chars.your_role_name }}: A specific character in the chat
{{ event }}: A narrated event, visible to the character and the user
{{ note }}: A silent note, visible to the character and the user
{{ secret }}: A silent note, visible only to the character
{{ instructions }}: A silent note, visible only to the user

Those messages will be created one after the other.

You can also finish your bootstrap with {{ user }}: ... to allow the user to start the conversation.

Scripts

The initialization script will be run when the chat is started.

The Scenario Script and Stage Script can be referenced by actions and events, using import { your_exports } from "@voxta/scenario"; and import { your_exports } from "@voxta/stage"; respectively.

See Scripts for more information.

Events

Events are used to drive roleplay or storytelling. They can be triggered at specific times or following specific messages.

See Events for more information.

Actions

Actions use action inference to determine what action to take before or after a message. This is used to make visual reactions, such as smiling or moving around.

See Actions for more information.

Contexts

Contexts are sentences added to the chat prompt just before the character’s answer, providing context to the reply. It can contain facts about the environment, the pose, or the character’s feelings.

See Contexts for more information.

Impersonation

In some scenarios, you may want to play a role rather than “being yourself” This allows you to override your name and your description for the scenario.