Class FeedbackExperimentItem.Builder
-
- All Implemented Interfaces:
public final class FeedbackExperimentItem.BuilderA builder for FeedbackExperimentItem.
-
-
Method Summary
-
-
Method Detail
-
id
final FeedbackExperimentItem.Builder id(String id)
The id of the experiment event to log feedback for. This is the row
idreturned byPOST /v1/experiment/{experiment_id}/insert
-
id
final FeedbackExperimentItem.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.
-
comment
final FeedbackExperimentItem.Builder comment(String comment)
An optional comment string to log about the experiment event
-
comment
final FeedbackExperimentItem.Builder comment(Optional<String> comment)
Alias for calling Builder.comment with
comment.orElse(null).
-
comment
final FeedbackExperimentItem.Builder comment(JsonField<String> comment)
Sets Builder.comment to an arbitrary JSON value.
You should usually call Builder.comment 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 FeedbackExperimentItem.Builder expected(JsonValue expected)
The ground truth value (an arbitrary, JSON serializable object) that you'd compare to
outputto determine if youroutputvalue is correct or not
-
metadata
final FeedbackExperimentItem.Builder metadata(FeedbackExperimentItem.Metadata metadata)
A dictionary with additional data about the feedback. If you have a
user_id, you can log it here and access it in the Braintrust UI. Note, this metadata does not correspond to the main event itself, but rather the audit log attached to the event.
-
metadata
final FeedbackExperimentItem.Builder metadata(Optional<FeedbackExperimentItem.Metadata> metadata)
Alias for calling Builder.metadata with
metadata.orElse(null).
-
metadata
final FeedbackExperimentItem.Builder metadata(JsonField<FeedbackExperimentItem.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.
-
scores
final FeedbackExperimentItem.Builder scores(FeedbackExperimentItem.Scores scores)
A dictionary of numeric values (between 0 and 1) to log. These scores will be merged into the existing scores for the experiment event
-
scores
final FeedbackExperimentItem.Builder scores(Optional<FeedbackExperimentItem.Scores> scores)
Alias for calling Builder.scores with
scores.orElse(null).
-
scores
final FeedbackExperimentItem.Builder scores(JsonField<FeedbackExperimentItem.Scores> scores)
Sets Builder.scores to an arbitrary JSON value.
You should usually call Builder.scores with a well-typed Scores value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
source
final FeedbackExperimentItem.Builder source(FeedbackExperimentItem.Source source)
The source of the feedback. Must be one of "external" (default), "app", or "api"
-
source
final FeedbackExperimentItem.Builder source(Optional<FeedbackExperimentItem.Source> source)
Alias for calling Builder.source with
source.orElse(null).
-
source
final FeedbackExperimentItem.Builder source(JsonField<FeedbackExperimentItem.Source> source)
Sets Builder.source to an arbitrary JSON value.
You should usually call Builder.source with a well-typed Source value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
tags
final FeedbackExperimentItem.Builder tags(List<String> tags)
A list of tags to log
-
tags
final FeedbackExperimentItem.Builder tags(Optional<List<String>> tags)
Alias for calling Builder.tags with
tags.orElse(null).
-
tags
final FeedbackExperimentItem.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 FeedbackExperimentItem.Builder addTag(String tag)
-
additionalProperties
final FeedbackExperimentItem.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final FeedbackExperimentItem.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final FeedbackExperimentItem.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final FeedbackExperimentItem.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final FeedbackExperimentItem.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final FeedbackExperimentItem build()
Returns an immutable instance of FeedbackExperimentItem.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.id()
-
-
-
-