Class DefaultApi
A REST API for in-context learning with the SAP-RPT-1 model.
-
Field Summary
Fields inherited from class com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
apiClient, defaultHeaders -
Constructor Summary
ConstructorsConstructorDescriptionDefaultApi(com.sap.cloud.sdk.cloudplatform.connectivity.Destination httpDestination) Instantiates this API class to invoke operations on the SAP-RPT-1 Tabular AI.DefaultApi(com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient apiClient) Instantiates this API class to invoke operations on the SAP-RPT-1 Tabular AI based on a givenApiClient. -
Method Summary
Modifier and TypeMethodDescriptionpredict(PredictRequestPayload predictRequestPayload) Make in-context predictions for specified target columns based on provided table data JSON (optionally gzip-compressed).predictParquet(File _file, String predictionConfig) Make in-context predictions for specified target columns based on provided table data Parquet file.predictParquet(File _file, String predictionConfig, String indexColumn, Boolean parseDataTypes) Make in-context predictions for specified target columns based on provided table data Parquet file.withDefaultHeaders(Map<String, String> defaultHeaders) Creates a new API instance with additional default headers.
-
Constructor Details
-
DefaultApi
public DefaultApi(@Nonnull com.sap.cloud.sdk.cloudplatform.connectivity.Destination httpDestination) Instantiates this API class to invoke operations on the SAP-RPT-1 Tabular AI.- Parameters:
httpDestination- The destination that API should be used with
-
DefaultApi
public DefaultApi(@Nonnull com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient apiClient) Instantiates this API class to invoke operations on the SAP-RPT-1 Tabular AI based on a givenApiClient.- Parameters:
apiClient- ApiClient to invoke the API on
-
-
Method Details
-
withDefaultHeaders
Creates a new API instance with additional default headers.- Parameters:
defaultHeaders- Additional headers to include in all requests- Returns:
- A new API instance with the combined headers
-
predict
@Nonnull public PredictResponsePayload predict(@Nonnull PredictRequestPayload predictRequestPayload) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Make in-context predictions for specified target columns based on provided table data JSON (optionally gzip-compressed).Make in-context predictions for specified target columns. Either \"rows\" or \"columns\" must be provided and must contain both context and query rows. You can optionally send gzip-compressed JSON payloads and set a \"Content-Encoding: gzip\" header.
200 - Successful Prediction
400 - Bad Request - Invalid input data
413 - Payload Too Large
422 - Validation Error
500 - Internal Server Error
- Parameters:
predictRequestPayload- The value for the parameter predictRequestPayload- Returns:
- PredictResponsePayload
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
predictParquet
@Nonnull public PredictResponsePayload predictParquet(@Nonnull File _file, @Nonnull String predictionConfig, @Nullable String indexColumn, @Nullable Boolean parseDataTypes) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Make in-context predictions for specified target columns based on provided table data Parquet file.Make in-context predictions for specified target columns based on provided table data Parquet file.
200 - Successful Prediction
400 - Bad Request - Invalid input data
413 - Payload Too Large
422 - Validation Error
500 - Internal Server Error
- Parameters:
_file- (required) Parquet file containing the datapredictionConfig- (required) JSON string for prediction_configindexColumn- (optional) Optional index column nameparseDataTypes- (optional, default to true) Whether to parse data types- Returns:
- PredictResponsePayload
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
predictParquet
@Nonnull public PredictResponsePayload predictParquet(@Nonnull File _file, @Nonnull String predictionConfig) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Make in-context predictions for specified target columns based on provided table data Parquet file.Make in-context predictions for specified target columns based on provided table data Parquet file.
200 - Successful Prediction
400 - Bad Request - Invalid input data
413 - Payload Too Large
422 - Validation Error
500 - Internal Server Error
- Parameters:
_file- Parquet file containing the datapredictionConfig- JSON string for prediction_config- Returns:
- PredictResponsePayload
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-