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

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

data.text example

type: data.text
event_data:
  contents: "Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the Galaxy lies a small unregarded yellow sun."

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

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

data.json example

type: data.json
event_data:
  some_key: some_value
  another_key: another_value

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

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

data.base64_img example

type: data.base64_img
event_data:
  contents: iVBORw0KGgoAAAANSUhEUgAAAAUAAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==