Class DatasetEvent.Builder
-
- All Implemented Interfaces:
public final class DatasetEvent.BuilderA builder for DatasetEvent.
-
-
Method Summary
Modifier and Type Method Description final DatasetEvent.Builderid(String id)A unique identifier for the dataset event. final DatasetEvent.Builderid(JsonField<String> id)Sets Builder.id to an arbitrary JSON value. final DatasetEvent.Builder_xactId(String _xactId)The transaction id of an event is unique to the network operation that processed the event insertion. final DatasetEvent.Builder_xactId(JsonField<String> _xactId)Sets Builder._xactId to an arbitrary JSON value. final DatasetEvent.Buildercreated(OffsetDateTime created)The timestamp the dataset event was created final DatasetEvent.Buildercreated(JsonField<OffsetDateTime> created)Sets Builder.created to an arbitrary JSON value. final DatasetEvent.BuilderdatasetId(String datasetId)Unique identifier for the dataset final DatasetEvent.BuilderdatasetId(JsonField<String> datasetId)Sets Builder.datasetId to an arbitrary JSON value. final DatasetEvent.BuilderprojectId(String projectId)Unique identifier for the project that the dataset belongs under final DatasetEvent.BuilderprojectId(JsonField<String> projectId)Sets Builder.projectId to an arbitrary JSON value. final DatasetEvent.BuilderrootSpanId(String rootSpanId)A unique identifier for the trace this dataset event belongs to final DatasetEvent.BuilderrootSpanId(JsonField<String> rootSpanId)Sets Builder.rootSpanId to an arbitrary JSON value. final DatasetEvent.BuilderspanId(String spanId)A unique identifier used to link different dataset events together as part of a full trace. final DatasetEvent.BuilderspanId(JsonField<String> spanId)Sets Builder.spanId to an arbitrary JSON value. final DatasetEvent.Builderexpected(JsonValue expected)The output of your application, including post-processing (an arbitrary, JSON serializable object) final DatasetEvent.Builderinput(JsonValue input)The argument that uniquely define an input case (an arbitrary, JSON serializable object) final DatasetEvent.BuilderisRoot(Boolean isRoot)Whether this span is a root span final DatasetEvent.BuilderisRoot(Boolean isRoot)Alias for Builder.isRoot. final DatasetEvent.BuilderisRoot(Optional<Boolean> isRoot)Alias for calling Builder.isRoot with isRoot.orElse(null).final DatasetEvent.BuilderisRoot(JsonField<Boolean> isRoot)Sets Builder.isRoot to an arbitrary JSON value. final DatasetEvent.Buildermetadata(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 DatasetEvent.Buildermetadata(Optional<DatasetEvent.Metadata> metadata)Alias for calling Builder.metadata with metadata.orElse(null).final DatasetEvent.Buildermetadata(JsonField<DatasetEvent.Metadata> metadata)Sets Builder.metadata to an arbitrary JSON value. final DatasetEvent.Builderorigin(ObjectReference origin)Indicates the event was copied from another object. final DatasetEvent.Builderorigin(Optional<ObjectReference> origin)Alias for calling Builder.origin with origin.orElse(null).final DatasetEvent.Builderorigin(JsonField<ObjectReference> origin)Sets Builder.origin to an arbitrary JSON value. final DatasetEvent.Buildertags(List<String> tags)A list of tags to log final DatasetEvent.Buildertags(Optional<List<String>> tags)Alias for calling Builder.tags with tags.orElse(null).final DatasetEvent.Buildertags(JsonField<List<String>> tags)Sets Builder.tags to an arbitrary JSON value. final DatasetEvent.BuilderaddTag(String tag)Adds a single String to tags. final DatasetEvent.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final DatasetEvent.BuilderputAdditionalProperty(String key, JsonValue value)final DatasetEvent.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final DatasetEvent.BuilderremoveAdditionalProperty(String key)final DatasetEvent.BuilderremoveAllAdditionalProperties(Set<String> keys)final DatasetEventbuild()Returns an immutable instance of DatasetEvent. -
-
Method Detail
-
id
final DatasetEvent.Builder id(String id)
A unique identifier for the dataset event. If you don't provide one, BrainTrust will generate one for you
-
id
final DatasetEvent.Builder id(JsonField<String> id)
Sets Builder.id to an arbitrary JSON value.
You should usually call Builder.id with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
_xactId
final DatasetEvent.Builder _xactId(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)
-
_xactId
final DatasetEvent.Builder _xactId(JsonField<String> _xactId)
Sets Builder._xactId to an arbitrary JSON value.
You should usually call Builder._xactId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
created
final DatasetEvent.Builder created(OffsetDateTime created)
The timestamp the dataset event was created
-
created
final DatasetEvent.Builder created(JsonField<OffsetDateTime> created)
Sets Builder.created to an arbitrary JSON value.
You should usually call Builder.created with a well-typed OffsetDateTime value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
datasetId
final DatasetEvent.Builder datasetId(String datasetId)
Unique identifier for the dataset
-
datasetId
final DatasetEvent.Builder datasetId(JsonField<String> datasetId)
Sets Builder.datasetId to an arbitrary JSON value.
You should usually call Builder.datasetId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
projectId
final DatasetEvent.Builder projectId(String projectId)
Unique identifier for the project that the dataset belongs under
-
projectId
final DatasetEvent.Builder projectId(JsonField<String> projectId)
Sets Builder.projectId to an arbitrary JSON value.
You should usually call Builder.projectId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
rootSpanId
final DatasetEvent.Builder rootSpanId(String rootSpanId)
A unique identifier for the trace this dataset event belongs to
-
rootSpanId
final DatasetEvent.Builder rootSpanId(JsonField<String> rootSpanId)
Sets Builder.rootSpanId to an arbitrary JSON value.
You should usually call Builder.rootSpanId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
spanId
final DatasetEvent.Builder spanId(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
-
spanId
final DatasetEvent.Builder spanId(JsonField<String> spanId)
Sets Builder.spanId to an arbitrary JSON value.
You should usually call Builder.spanId with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
expected
final DatasetEvent.Builder expected(JsonValue expected)
The output of your application, including post-processing (an arbitrary, JSON serializable object)
-
input
final DatasetEvent.Builder input(JsonValue input)
The argument that uniquely define an input case (an arbitrary, JSON serializable object)
-
isRoot
final DatasetEvent.Builder isRoot(Boolean isRoot)
Whether this span is a root span
-
isRoot
final DatasetEvent.Builder isRoot(Boolean isRoot)
Alias for Builder.isRoot.
This unboxed primitive overload exists for backwards compatibility.
-
isRoot
final DatasetEvent.Builder isRoot(Optional<Boolean> isRoot)
Alias for calling Builder.isRoot with
isRoot.orElse(null).
-
isRoot
final DatasetEvent.Builder isRoot(JsonField<Boolean> isRoot)
Sets Builder.isRoot to an arbitrary JSON value.
You should usually call Builder.isRoot with a well-typed Boolean value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
metadata
final DatasetEvent.Builder metadata(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
-
metadata
final DatasetEvent.Builder metadata(Optional<DatasetEvent.Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null).
-
metadata
final DatasetEvent.Builder metadata(JsonField<DatasetEvent.Metadata> metadata)
Sets Builder.metadata to an arbitrary JSON value.
You should usually call Builder.metadata with a well-typed Metadata value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
origin
final DatasetEvent.Builder origin(ObjectReference origin)
Indicates the event was copied from another object.
-
origin
final DatasetEvent.Builder origin(Optional<ObjectReference> origin)
Alias for calling Builder.origin with
origin.orElse(null).
-
origin
final DatasetEvent.Builder origin(JsonField<ObjectReference> origin)
Sets Builder.origin to an arbitrary JSON value.
You should usually call Builder.origin with a well-typed ObjectReference value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
tags
final DatasetEvent.Builder tags(List<String> tags)
A list of tags to log
-
tags
final DatasetEvent.Builder tags(Optional<List<String>> tags)
Alias for calling Builder.tags with
tags.orElse(null).
-
tags
final DatasetEvent.Builder tags(JsonField<List<String>> tags)
Sets Builder.tags to an arbitrary JSON value.
You should usually call Builder.tags with a well-typed
List<String>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTag
final DatasetEvent.Builder addTag(String tag)
-
additionalProperties
final DatasetEvent.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final DatasetEvent.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final DatasetEvent.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final DatasetEvent.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final DatasetEvent.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final DatasetEvent build()
Returns an immutable instance of DatasetEvent.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id() ._xactId() .created() .datasetId() .projectId() .rootSpanId() .spanId()
-
-
-
-