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
Variables | Description |
---|---|
Prepared | The IndexQueue that used to host the Utterances that's ready to present. |
Processed | The processed IndexQueue of the Utterances |
Cancelled | The cancelled IndexQueue of the Utterances |
Properties
Properties | Description |
---|---|
ID | The ID of the interaction. |
RecentTime | The recent visit time of the interaction. |
ReceivedInteractionEnd | Identifies if the current interaction receives the ControlPacket with INTERACTION_END |
CurrentUtterance | The current utterance. |
IsEmpty | Check if the interaction is empty. |
API
Function | Description | Parameters |
---|---|---|
Add | Add 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. |
Dequeue | Dequeue the first added Utterances | |
Contains | Check if it contains the target InworldPacket. | InworldPacket: target packet. |
Cancel | Cancel this current interaction. Pour the prepared Utterances into the cancelled Utterances. | isHardCancelling: if you also need to clear the CurrentUtterance. |
OnDequeue | By default, it returns true directly. |