Class EvalRetrieveResponse.DataSourceConfig
-
- All Implemented Interfaces:
public final class EvalRetrieveResponse.DataSourceConfigConfiguration of data sources used in runs of the evaluation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceEvalRetrieveResponse.DataSourceConfig.VisitorAn interface that defines how to map each variant of DataSourceConfig to a value of type T.
public final classEvalRetrieveResponse.DataSourceConfig.LogsA LogsDataSourceConfig which specifies the metadata property of your logs query. This is usually metadata like
usecase=chatbotorprompt-version=v2, etc. The schema returned by this data source config is used to defined what variables are available in your evals.itemandsampleare both defined when using this data source config.
-
Method Summary
Modifier and Type Method Description final Optional<EvalCustomDataSourceConfig>custom()A CustomDataSourceConfig which specifies the schema of your itemand optionallysamplenamespaces.final Optional<EvalRetrieveResponse.DataSourceConfig.Logs>logs()A LogsDataSourceConfig which specifies the metadata property of your logs query. final Optional<EvalStoredCompletionsDataSourceConfig>storedCompletions()Deprecated in favor of LogsDataSourceConfig. final BooleanisCustom()final BooleanisLogs()final BooleanisStoredCompletions()final EvalCustomDataSourceConfigasCustom()A CustomDataSourceConfig which specifies the schema of your itemand optionallysamplenamespaces.final EvalRetrieveResponse.DataSourceConfig.LogsasLogs()A LogsDataSourceConfig which specifies the metadata property of your logs query. final EvalStoredCompletionsDataSourceConfigasStoredCompletions()Deprecated in favor of LogsDataSourceConfig. final Optional<JsonValue>_json()final <T extends Any> Taccept(EvalRetrieveResponse.DataSourceConfig.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final EvalRetrieveResponse.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 EvalRetrieveResponse.DataSourceConfigofCustom(EvalCustomDataSourceConfig custom)A CustomDataSourceConfig which specifies the schema of your itemand optionallysamplenamespaces.final static EvalRetrieveResponse.DataSourceConfigofLogs(EvalRetrieveResponse.DataSourceConfig.Logs logs)A LogsDataSourceConfig which specifies the metadata property of your logs query. final static EvalRetrieveResponse.DataSourceConfigofStoredCompletions(EvalStoredCompletionsDataSourceConfig storedCompletions)Deprecated in favor of LogsDataSourceConfig. -
-
Method Detail
-
custom
final Optional<EvalCustomDataSourceConfig> custom()
A CustomDataSourceConfig which specifies the schema of your
itemand optionallysamplenamespaces. The response schema defines 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<EvalRetrieveResponse.DataSourceConfig.Logs> logs()
A LogsDataSourceConfig which specifies the metadata property of your logs query. This is usually metadata like
usecase=chatbotorprompt-version=v2, etc. The schema returned by this data source config is used to defined what variables are available in your evals.itemandsampleare both defined when using this data source config.
-
storedCompletions
@Deprecated(message = "deprecated") final Optional<EvalStoredCompletionsDataSourceConfig> storedCompletions()
Deprecated in favor of LogsDataSourceConfig.
-
isStoredCompletions
@Deprecated(message = "deprecated") final Boolean isStoredCompletions()
-
asCustom
final EvalCustomDataSourceConfig asCustom()
A CustomDataSourceConfig which specifies the schema of your
itemand optionallysamplenamespaces. The response schema defines 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 EvalRetrieveResponse.DataSourceConfig.Logs asLogs()
A LogsDataSourceConfig which specifies the metadata property of your logs query. This is usually metadata like
usecase=chatbotorprompt-version=v2, etc. The schema returned by this data source config is used to defined what variables are available in your evals.itemandsampleare both defined when using this data source config.
-
asStoredCompletions
@Deprecated(message = "deprecated") final EvalStoredCompletionsDataSourceConfig asStoredCompletions()
Deprecated in favor of LogsDataSourceConfig.
-
accept
final <T extends Any> T accept(EvalRetrieveResponse.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(EvalCustomDataSourceConfig custom) { return Optional.of(custom.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final EvalRetrieveResponse.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 EvalRetrieveResponse.DataSourceConfig ofCustom(EvalCustomDataSourceConfig custom)
A CustomDataSourceConfig which specifies the schema of your
itemand optionallysamplenamespaces. The response schema defines 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 EvalRetrieveResponse.DataSourceConfig ofLogs(EvalRetrieveResponse.DataSourceConfig.Logs logs)
A LogsDataSourceConfig which specifies the metadata property of your logs query. This is usually metadata like
usecase=chatbotorprompt-version=v2, etc. The schema returned by this data source config is used to defined what variables are available in your evals.itemandsampleare both defined when using this data source config.
-
ofStoredCompletions
@Deprecated(message = "deprecated") final static EvalRetrieveResponse.DataSourceConfig ofStoredCompletions(EvalStoredCompletionsDataSourceConfig storedCompletions)
Deprecated in favor of LogsDataSourceConfig.
-
-
-
-