Skip to main content
Data events allow a developer to package and combine multimodal sensor so it can be used as real-time inputs to an active lens or to build offline datasets for fine-tuning and evaluating models. Each data event has a type (e.g. data.text, data.json, data.base64_img) that identifies the category of multimodal data, with the event_data containing the associated payload (e.g. the text data, the json data, the base64 image). The current data events are:

data.text

The data.text event can be used to embed textual data within an event message as part of a multimodal message.

data.text parameters

string
required
The data.text key identifies that this event is a text event.
object
required
Contains the text payload and associated metadata.
str
required
The contents key contains the main body of the text data.

data.text example

data.json

The data.json event can be used to embed a base64 encoded image directly into an event message. The data.json event is used to send images directly as input to a lens.

data.json parameters

string
required
The data.json key identifies that this event is a json dictonary.
object
required
Contains the JSON payload.

data.json example

data.base64_img

The data.base64_img event can be used to embed a base64 encoded image directly into an event message. The data.base64_img event is used to send images directly as input to a lens.

data.base64_img parameters

string
required
The data.base64_img key identifies that this event is a base64 image event.
object
required
Contains the image payload and associated metadata.
str
required
The base64 encoded image as a byte string.

data.base64_img example