Class DatasetEvent
-
- All Implemented Interfaces:
public final class DatasetEvent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classDatasetEvent.BuilderA builder for DatasetEvent.
public final classDatasetEvent.MetadataA dictionary with additional data about the test example, model outputs, or just about anything else that's relevant, that you can use to help find and analyze examples later. For example, you could log the
prompt, example'sid, or anything else that would be useful to slice/dice later. The values inmetadatacan be any JSON-serializable type, but its keys must be strings
-
Method Summary
Modifier and Type Method Description final Stringid()A unique identifier for the dataset event. final String_xactId()The transaction id of an event is unique to the network operation that processed the event insertion. final OffsetDateTimecreated()The timestamp the dataset event was created final StringdatasetId()Unique identifier for the dataset final StringprojectId()Unique identifier for the project that the dataset belongs under final StringrootSpanId()A unique identifier for the trace this dataset event belongs to final StringspanId()A unique identifier used to link different dataset events together as part of a full trace. final JsonValue_expected()The output of your application, including post-processing (an arbitrary, JSON serializable object) final JsonValue_input()The argument that uniquely define an input case (an arbitrary, JSON serializable object) final Optional<Boolean>isRoot()Whether this span is a root span final Optional<DatasetEvent.Metadata>metadata()A dictionary with additional data about the test example, model outputs, or just about anything else that's relevant, that you can use to help find and analyze examples later. final Optional<ObjectReference>origin()Indicates the event was copied from another object. final Optional<List<String>>tags()A list of tags to log final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>__xactId()Returns the raw JSON value of _xactId. final JsonField<OffsetDateTime>_created()Returns the raw JSON value of created. final JsonField<String>_datasetId()Returns the raw JSON value of datasetId. final JsonField<String>_projectId()Returns the raw JSON value of projectId. final JsonField<String>_rootSpanId()Returns the raw JSON value of rootSpanId. final JsonField<String>_spanId()Returns the raw JSON value of spanId. final JsonField<Boolean>_isRoot()Returns the raw JSON value of isRoot. final JsonField<DatasetEvent.Metadata>_metadata()Returns the raw JSON value of metadata. final JsonField<ObjectReference>_origin()Returns the raw JSON value of origin. final JsonField<List<String>>_tags()Returns the raw JSON value of tags. final Map<String, JsonValue>_additionalProperties()final DatasetEventvalidate()final DatasetEvent.BuildertoBuilder()Booleanequals(Object other)IntegerhashCode()StringtoString()final static DatasetEvent.Builderbuilder()Returns a mutable builder for constructing an instance of DatasetEvent. -
-
Method Detail
-
id
final String id()
A unique identifier for the dataset event. If you don't provide one, BrainTrust will generate one for you
-
_xactId
final String _xactId()
The transaction id of an event is unique to the network operation that processed the event insertion. Transaction ids are monotonically increasing over time and can be used to retrieve a versioned snapshot of the dataset (see the
versionparameter)
-
created
final OffsetDateTime created()
The timestamp the dataset event was created
-
rootSpanId
final String rootSpanId()
A unique identifier for the trace this dataset event belongs to
-
spanId
final String spanId()
A unique identifier used to link different dataset events together as part of a full trace. See the tracing guide for full details on tracing
-
_expected
final JsonValue _expected()
The output of your application, including post-processing (an arbitrary, JSON serializable object)
-
_input
final JsonValue _input()
The argument that uniquely define an input case (an arbitrary, JSON serializable object)
-
metadata
final Optional<DatasetEvent.Metadata> metadata()
A dictionary with additional data about the test example, model outputs, or just about anything else that's relevant, that you can use to help find and analyze examples later. For example, you could log the
prompt, example'sid, or anything else that would be useful to slice/dice later. The values inmetadatacan be any JSON-serializable type, but its keys must be strings
-
origin
final Optional<ObjectReference> origin()
Indicates the event was copied from another object.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
__xactId
final JsonField<String> __xactId()
Returns the raw JSON value of _xactId.
Unlike _xactId, this method doesn't throw if the JSON field has an unexpected type.
-
_created
final JsonField<OffsetDateTime> _created()
Returns the raw JSON value of created.
Unlike created, this method doesn't throw if the JSON field has an unexpected type.
-
_datasetId
final JsonField<String> _datasetId()
Returns the raw JSON value of datasetId.
Unlike datasetId, this method doesn't throw if the JSON field has an unexpected type.
-
_projectId
final JsonField<String> _projectId()
Returns the raw JSON value of projectId.
Unlike projectId, this method doesn't throw if the JSON field has an unexpected type.
-
_rootSpanId
final JsonField<String> _rootSpanId()
Returns the raw JSON value of rootSpanId.
Unlike rootSpanId, this method doesn't throw if the JSON field has an unexpected type.
-
_spanId
final JsonField<String> _spanId()
Returns the raw JSON value of spanId.
Unlike spanId, this method doesn't throw if the JSON field has an unexpected type.
-
_isRoot
final JsonField<Boolean> _isRoot()
Returns the raw JSON value of isRoot.
Unlike isRoot, this method doesn't throw if the JSON field has an unexpected type.
-
_metadata
final JsonField<DatasetEvent.Metadata> _metadata()
Returns the raw JSON value of metadata.
Unlike metadata, this method doesn't throw if the JSON field has an unexpected type.
-
_origin
final JsonField<ObjectReference> _origin()
Returns the raw JSON value of origin.
Unlike origin, this method doesn't throw if the JSON field has an unexpected type.
-
_tags
final JsonField<List<String>> _tags()
Returns the raw JSON value of tags.
Unlike tags, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
validate
final DatasetEvent validate()
-
toBuilder
final DatasetEvent.Builder toBuilder()
-
builder
final static DatasetEvent.Builder builder()
Returns a mutable builder for constructing an instance of DatasetEvent.
The following fields are required:
.id() ._xactId() .created() .datasetId() .projectId() .rootSpanId() .spanId()
-
-
-
-