SAP AI SDK for JavaScript - v2.16.0
    Preparing search index...

    Class RptClient

    Representation of an RPT client to make predictions.

    Index
    • Creates an instance of the RPT client.

      Parameters

      • modelDeployment: ModelDeployment<SapRptModel>

        This configuration is used to retrieve a deployment. Depending on the configuration use either the given deployment ID or the model name to retrieve matching deployments. If model and deployment ID are given, the model is verified against the deployment.

      • Optionaldestination: HttpDestinationOrFetchOptions

        The destination to use for the request.

      Returns RptClient

    • Predict based on Parquet file data. Parquet is a binary tabular data format with typed columns.

      Parameters

      • payload: ParquetPayload

        Parquet data and prediction configuration to base prediction on.

      • OptionalrequestConfig: Omit<RptRequestOptions, "compress">

        Custom request configuration.

      Returns Promise<PredictResponsePayload>

      Prediction response.

    • Predict based on data schema and prediction data. Prefer using this method when the data schema is known.

      Type Parameters

      • const T extends DataSchema

      Parameters

      • dataSchema: T

        Prediction data follows this schema. When using TypeScript, the data schema type is used to infer the types of the prediction data. In that case, the data schema must be provided as a constant (as const).

      • predictionData: PredictionData<T>

        Data to base prediction on.

      • OptionalrequestConfig: RptRequestOptions

        Custom request configuration.

      Returns Promise<PredictResponsePayload>

      Prediction response.