One of the following:
class LabelModelGrader:

A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.

List<Input> input
Content content

Inputs to the model - can contain template strings. Supports text, output text, input images, and input audio, either as a single item or an array of items.

One of the following:
String
class ResponseInputText:

A text input to the model.

String text

The text input to the model.

JsonValue; type
constant
constant

The type of the input item. Always input_text.

Optional<PromptCacheBreakpoint> promptCacheBreakpoint

Marks the exact end of a reusable prompt prefix. When ttl is omitted, the breakpoint inherits the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

JsonValue; mode
constant
constant

The breakpoint mode. Always explicit.

The minimum lifetime of this cache breakpoint. Defaults to the request TTL.

One of the following:
_30M("30m")
_12H("12h")
class OutputText:

A text output from the model.

String text

The text output from the model.

JsonValue; type
constant
constant

The type of the output text. Always output_text.

class InputImage:

An image input block used within EvalItem content arrays.

String imageUrl

The URL of the image input.

formaturi
JsonValue; type
constant
constant

The type of the image input. Always input_image.

Optional<String> detail

The detail level of the image to be sent to the model. One of high, low, or auto. Defaults to auto.

class ResponseInputAudio:

An audio input to the model.

InputAudio inputAudio
String data

Base64-encoded audio data.

Format format

The format of the audio data. Currently supported formats are mp3 and wav.

One of the following:
MP3("mp3")
WAV("wav")
JsonValue; type
constant
constant

The type of the input item. Always input_audio.

One of the following:
String
class ResponseInputText:

A text input to the model.

String text

The text input to the model.

JsonValue; type
constant
constant

The type of the input item. Always input_text.

Optional<PromptCacheBreakpoint> promptCacheBreakpoint

Marks the exact end of a reusable prompt prefix. When ttl is omitted, the breakpoint inherits the request’s prompt_cache_options.ttl; the boundary is not rounded to a token block.

JsonValue; mode
constant
constant

The breakpoint mode. Always explicit.

The minimum lifetime of this cache breakpoint. Defaults to the request TTL.

One of the following:
_30M("30m")
_12H("12h")
OutputText
This type repeats the enclosing schema.
InputImage
This type repeats the enclosing schema.
class ResponseInputAudio:

An audio input to the model.

InputAudio inputAudio
String data

Base64-encoded audio data.

Format format

The format of the audio data. Currently supported formats are mp3 and wav.

One of the following:
MP3("mp3")
WAV("wav")
JsonValue; type
constant
constant

The type of the input item. Always input_audio.

Role role

The role of the message input. One of user, assistant, system, or developer.

One of the following:
USER("user")
ASSISTANT("assistant")
SYSTEM("system")
DEVELOPER("developer")
Optional<Type> type

The type of the message input. Always message.

List<String> labels

The labels to assign to each item in the evaluation.

String model

The model to use for the evaluation. Must support structured outputs.

String name

The name of the grader.

List<String> passingLabels

The labels that indicate a passing result. Must be a subset of labels.

JsonValue; type
constant
constant

The object type, which is always label_model.

class StringCheckGrader:

A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.

String input

The input text. This may include template strings.

String name

The name of the grader.

Operation operation

The string check operation to perform. One of eq, ne, like, or ilike.

One of the following:
EQ("eq")
NE("ne")
LIKE("like")
ILIKE("ilike")
String reference

The reference text. This may include template strings.

JsonValue; type
constant
constant

The object type, which is always string_check.

class EvalGraderTextSimilarity:

A TextSimilarityGrader object which grades text based on similarity metrics.

double passThreshold

The threshold for the score.

class EvalGraderPython:

A PythonGrader object that runs a python script on the input.

Optional<Double> passThreshold

The threshold for the score.

class EvalGraderScoreModel:

A ScoreModelGrader object that uses a model to assign a score to the input.

Optional<Double> passThreshold

The threshold for the score.