InworldNetworkPacket
Module: Inworld.AI. Namespace: Inworld.Packet. inherited from InworldPacket
In the runtime environment, data is transmitted through JSON strings. It is necessary to determine the specific type of packet that is being received. To address this, the InworldNetworkPacket class has been introduced. This class acts as the initial filter for incoming packets and is responsible for categorizing and distributing them to their respective classes based on their type.
Variables | Description |
---|---|
text | The TextEvent encapsulated within the packet, if exists. |
control | The ControlEvent encapsulated within the packet, if exists. |
dataChunk | The DataChunk encapsulated within the packet, if exists. |
gesture | The GestureEvent encapsulated within the packet, if exists. |
custom | The CustomEvent (triggers) encapsulated within the packet, if exists. |
mutation | The MutationEvent (interruptions) encapsulated within the packet, if exists. |
emotion | The EmotionEvent encapsulated within the packet, if exists. |
action | The ActionEvent encapsulated within the packet, if exists. |
debugInfo | The RelationEvent encapsulated within the packet, if exists. |
Properties | Description |
---|---|
Packet | Returns the InworldPacket with the correct type by checking the data. |
Type | Returns the actual type of the InworldPacket by checking the data. |
Related Classes
InworldError
Module: Inworld.AI. Namespace: Inworld.Packet.
Variables | Description |
---|---|
code | The error code returned from the Inworld server. |
message | The detailed string of the error message. |
details | A list of InworldErrorData objects returned from the Inworld server. |
Properties | Description |
---|---|
IsValid | Returns whether this error is valid or not. |
RetryType | Returns an instruction ReconnectType to the client from the server about wha the server expects the client to do. |
ErrorType | Returns the ErrorType received from the Inworld server. |
InworldErrorData
Module: Inworld.AI. Namespace: Inworld.Packet.
Variables | Description |
---|---|
errorType | The ErrorType received from the Inworld server. |
reconnectType | An instruction ReconnectType to the client from the server about wha the server expects the client to do. |
reconnectTime | Identify when is allowed to reconnect. |
maxRetries | The max retry times allowed from the InworldError. |
NetworkPacketResponse
Module: Inworld.AI. Namespace: Inworld.Packet.
The NetworkPacketResponse class serves as a container for the InworldNetworkPacket received from websockets, facilitating efficient data handling and processing within the Inworld environment.
Variables | Description |
---|---|
result | The InworldNetworkPacket received from the websocket. |
error | The InworldError received from the websocket. |