Class EvalCreateParams.DataSourceConfig
-
- All Implemented Interfaces:
public final class EvalCreateParams.DataSourceConfigThe configuration for the data source used for the evaluation runs. Dictates the schema of the data used in the evaluation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceEvalCreateParams.DataSourceConfig.VisitorAn interface that defines how to map each variant of DataSourceConfig to a value of type T.
public final classEvalCreateParams.DataSourceConfig.CustomA CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs. This schema is used to define the shape of the data that will be:
Used to define your testing criteria and
What data is required when creating a run
public final classEvalCreateParams.DataSourceConfig.LogsA data source config which specifies the metadata property of your logs query. This is usually metadata like
usecase=chatbotorprompt-version=v2, etc.public final classEvalCreateParams.DataSourceConfig.StoredCompletionsDeprecated in favor of LogsDataSourceConfig.
-
Method Summary
Modifier and Type Method Description final Optional<EvalCreateParams.DataSourceConfig.Custom>custom()A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs. final Optional<EvalCreateParams.DataSourceConfig.Logs>logs()A data source config which specifies the metadata property of your logs query. final Optional<EvalCreateParams.DataSourceConfig.StoredCompletions>storedCompletions()Deprecated in favor of LogsDataSourceConfig. final BooleanisCustom()final BooleanisLogs()final BooleanisStoredCompletions()final EvalCreateParams.DataSourceConfig.CustomasCustom()A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs. final EvalCreateParams.DataSourceConfig.LogsasLogs()A data source config which specifies the metadata property of your logs query. final EvalCreateParams.DataSourceConfig.StoredCompletionsasStoredCompletions()Deprecated in favor of LogsDataSourceConfig. final Optional<JsonValue>_json()final <T extends Any> Taccept(EvalCreateParams.DataSourceConfig.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final EvalCreateParams.DataSourceConfigvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static EvalCreateParams.DataSourceConfigofCustom(EvalCreateParams.DataSourceConfig.Custom custom)A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs. final static EvalCreateParams.DataSourceConfigofLogs(EvalCreateParams.DataSourceConfig.Logs logs)A data source config which specifies the metadata property of your logs query. final static EvalCreateParams.DataSourceConfigofStoredCompletions(EvalCreateParams.DataSourceConfig.StoredCompletions storedCompletions)Deprecated in favor of LogsDataSourceConfig. -
-
Method Detail
-
custom
final Optional<EvalCreateParams.DataSourceConfig.Custom> custom()
A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs. This schema is used to define the shape of the data that will be:
Used to define your testing criteria and
What data is required when creating a run
-
logs
final Optional<EvalCreateParams.DataSourceConfig.Logs> logs()
A data source config which specifies the metadata property of your logs query. This is usually metadata like
usecase=chatbotorprompt-version=v2, etc.
-
storedCompletions
@Deprecated(message = "deprecated") final Optional<EvalCreateParams.DataSourceConfig.StoredCompletions> storedCompletions()
Deprecated in favor of LogsDataSourceConfig.
-
isStoredCompletions
@Deprecated(message = "deprecated") final Boolean isStoredCompletions()
-
asCustom
final EvalCreateParams.DataSourceConfig.Custom asCustom()
A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs. This schema is used to define the shape of the data that will be:
Used to define your testing criteria and
What data is required when creating a run
-
asLogs
final EvalCreateParams.DataSourceConfig.Logs asLogs()
A data source config which specifies the metadata property of your logs query. This is usually metadata like
usecase=chatbotorprompt-version=v2, etc.
-
asStoredCompletions
@Deprecated(message = "deprecated") final EvalCreateParams.DataSourceConfig.StoredCompletions asStoredCompletions()
Deprecated in favor of LogsDataSourceConfig.
-
accept
final <T extends Any> T accept(EvalCreateParams.DataSourceConfig.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 = dataSourceConfig.accept(new DataSourceConfig.Visitor<Optional<String>>() { @Override public Optional<String> visitCustom(Custom custom) { return Optional.of(custom.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final EvalCreateParams.DataSourceConfig 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.
-
ofCustom
final static EvalCreateParams.DataSourceConfig ofCustom(EvalCreateParams.DataSourceConfig.Custom custom)
A CustomDataSourceConfig object that defines the schema for the data source used for the evaluation runs. This schema is used to define the shape of the data that will be:
Used to define your testing criteria and
What data is required when creating a run
-
ofLogs
final static EvalCreateParams.DataSourceConfig ofLogs(EvalCreateParams.DataSourceConfig.Logs logs)
A data source config which specifies the metadata property of your logs query. This is usually metadata like
usecase=chatbotorprompt-version=v2, etc.
-
ofStoredCompletions
@Deprecated(message = "deprecated") final static EvalCreateParams.DataSourceConfig ofStoredCompletions(EvalCreateParams.DataSourceConfig.StoredCompletions storedCompletions)
Deprecated in favor of LogsDataSourceConfig.
-
-
-
-