Skip to main content

Interaction

Module: Inworld.AI. Namespace: Inworld.Interactions. Inherited from IContainable

This data structure is used to host interactions. In the Inworld, interaction is a term that used to host multiple Utterances.

Variables

VariablesDescription
PreparedThe IndexQueue that used to host the Utterances that's ready to present.
ProcessedThe processed IndexQueue of the Utterances
CancelledThe cancelled IndexQueue of the Utterances

Properties

PropertiesDescription
IDThe ID of the interaction.
RecentTimeThe recent visit time of the interaction.
CurrentUtteranceThe current utterance.
IsEmptyCheck if the interaction is empty.

API

FunctionDescriptionParameters
AddAdd the packet to the store data.
If it's over due and it's not a trigger, discard.
If it's in time, dispatch immediately.
Otherwise stored in cache.
If it needs to dispatch immediately, will return, otherwise return null.
InworldPacket: target packet to add.
DequeueDequeue the first added Utterances
ContainsCheck if it contains the target InworldPacket.InworldPacket: target packet.
CancelCancel this current interaction.
Pour the prepared Utterances into the cancelled Utterances.
isHardCancelling: if you also need to clear the CurrentUtterance.
OnDequeueBy default, it returns true directly.