Class RunListResponse.DataSource
-
- All Implemented Interfaces:
public final class RunListResponse.DataSourceInformation about the run's data source.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceRunListResponse.DataSource.VisitorAn interface that defines how to map each variant of DataSource to a value of type T.
public final classRunListResponse.DataSource.ResponsesA ResponsesRunDataSource object describing a model sampling configuration.
-
Method Summary
Modifier and Type Method Description final Optional<CreateEvalJsonlRunDataSource>jsonl()A JsonlRunDataSource object with that specifies a JSONL file that matches the eval final Optional<CreateEvalCompletionsRunDataSource>completions()A CompletionsRunDataSource object describing a model sampling configuration. final Optional<RunListResponse.DataSource.Responses>responses()A ResponsesRunDataSource object describing a model sampling configuration. final BooleanisJsonl()final BooleanisCompletions()final BooleanisResponses()final CreateEvalJsonlRunDataSourceasJsonl()A JsonlRunDataSource object with that specifies a JSONL file that matches the eval final CreateEvalCompletionsRunDataSourceasCompletions()A CompletionsRunDataSource object describing a model sampling configuration. final RunListResponse.DataSource.ResponsesasResponses()A ResponsesRunDataSource object describing a model sampling configuration. final Optional<JsonValue>_json()final <T extends Any> Taccept(RunListResponse.DataSource.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final RunListResponse.DataSourcevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RunListResponse.DataSourceofJsonl(CreateEvalJsonlRunDataSource jsonl)A JsonlRunDataSource object with that specifies a JSONL file that matches the eval final static RunListResponse.DataSourceofCompletions(CreateEvalCompletionsRunDataSource completions)A CompletionsRunDataSource object describing a model sampling configuration. final static RunListResponse.DataSourceofResponses(RunListResponse.DataSource.Responses responses)A ResponsesRunDataSource object describing a model sampling configuration. -
-
Method Detail
-
jsonl
final Optional<CreateEvalJsonlRunDataSource> jsonl()
A JsonlRunDataSource object with that specifies a JSONL file that matches the eval
-
completions
final Optional<CreateEvalCompletionsRunDataSource> completions()
A CompletionsRunDataSource object describing a model sampling configuration.
-
responses
final Optional<RunListResponse.DataSource.Responses> responses()
A ResponsesRunDataSource object describing a model sampling configuration.
-
isCompletions
final Boolean isCompletions()
-
isResponses
final Boolean isResponses()
-
asJsonl
final CreateEvalJsonlRunDataSource asJsonl()
A JsonlRunDataSource object with that specifies a JSONL file that matches the eval
-
asCompletions
final CreateEvalCompletionsRunDataSource asCompletions()
A CompletionsRunDataSource object describing a model sampling configuration.
-
asResponses
final RunListResponse.DataSource.Responses asResponses()
A ResponsesRunDataSource object describing a model sampling configuration.
-
accept
final <T extends Any> T accept(RunListResponse.DataSource.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.openai.core.JsonValue; import java.util.Optional; Optional<String> result = dataSource.accept(new DataSource.Visitor<Optional<String>>() { @Override public Optional<String> visitJsonl(CreateEvalJsonlRunDataSource jsonl) { return Optional.of(jsonl.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final RunListResponse.DataSource validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofJsonl
final static RunListResponse.DataSource ofJsonl(CreateEvalJsonlRunDataSource jsonl)
A JsonlRunDataSource object with that specifies a JSONL file that matches the eval
-
ofCompletions
final static RunListResponse.DataSource ofCompletions(CreateEvalCompletionsRunDataSource completions)
A CompletionsRunDataSource object describing a model sampling configuration.
-
ofResponses
final static RunListResponse.DataSource ofResponses(RunListResponse.DataSource.Responses responses)
A ResponsesRunDataSource object describing a model sampling configuration.
-
-
-
-