Class AiCoreService.InferenceDestinationBuilder

java.lang.Object
com.sap.ai.sdk.core.AiCoreService.InferenceDestinationBuilder
Enclosing class:
AiCoreService

public class AiCoreService.InferenceDestinationBuilder extends Object
Builder for creating inference destinations.
  • Method Details

    • usingDeploymentId

      @Nonnull public com.sap.cloud.sdk.cloudplatform.connectivity.HttpDestination usingDeploymentId(@Nonnull String deploymentId) throws com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException, com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationNotFoundException
      Use a fixed deployment ID to identify the deployment.
      Parameters:
      deploymentId - The ID of the deployment to target.
      Returns:
      A new destination targeting the specified deployment.
      Throws:
      com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationAccessException - If there was an issue creating the base destination, e.g. in case of invalid credentials.
      com.sap.cloud.sdk.cloudplatform.connectivity.exception.DestinationNotFoundException - If there was an issue creating the base destination, e.g. in case of missing credentials.
      See Also:
    • forModel

      @Nonnull public com.sap.cloud.sdk.cloudplatform.connectivity.HttpDestination forModel(@Nonnull AiModel model) throws DeploymentResolutionException
      Lookup a deployment based on the given AiModel. If there are multiple deployments for the given model, the first one is returned.
      Parameters:
      model - The model to be used for inference calls.
      Returns:
      A new destination targeting a deployment for the given model.
      Throws:
      DeploymentResolutionException - If no running deployment is found for the model.
      See Also:
    • forScenario

      @Nonnull public com.sap.cloud.sdk.cloudplatform.connectivity.HttpDestination forScenario(@Nonnull String scenarioId) throws DeploymentResolutionException
      Lookup a deployment based on the given scenario. If there are multiple deployments within the same scenario, the first one is returned.
      Parameters:
      scenarioId - The scenario to discover deployments for.
      Returns:
      A new destination targeting a deployment within the given scenario.
      Throws:
      DeploymentResolutionException - If no running deployment is found within the scenario.
      See Also: