Package com.sap.ai.sdk.core
Class AiCoreService.InferenceDestinationBuilder
java.lang.Object
com.sap.ai.sdk.core.AiCoreService.InferenceDestinationBuilder
- Enclosing class:
AiCoreService
Builder for creating inference destinations.
-
Method Summary
Modifier and TypeMethodDescriptioncom.sap.cloud.sdk.cloudplatform.connectivity.HttpDestinationLookup a deployment based on the givenAiModel.com.sap.cloud.sdk.cloudplatform.connectivity.HttpDestinationforScenario(String scenarioId) Lookup a deployment based on the given scenario.com.sap.cloud.sdk.cloudplatform.connectivity.HttpDestinationusingDeploymentId(String deploymentId) Use a fixed deployment ID to identify the deployment.
-
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 givenAiModel. 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:
-