Class CoreApi

java.lang.Object
com.sap.ai.sdk.core.CoreApi

public class CoreApi extends Object
Convenience class for the AI Core API.
  • Constructor Details

    • CoreApi

      public CoreApi()
      The default constructor. Uses the default AiCoreService.
    • CoreApi

      public CoreApi(@Nonnull AiCoreService aiCoreService)
      Constructor with a custom AiCoreService.
      Parameters:
      aiCoreService - the configured connectivity instance to AI Core.
  • Method Details

    • availableAiModels

      @Nonnull public AiModelList availableAiModels(@Nonnull String scenarioId, @Nonnull String resourceGroup)
      Query all foundation models available in SAP AI Core Gen AI Hub for the given scenario ID and resource group.
      Parameters:
      scenarioId - the scenario identifier.
      resourceGroup - the resource group to query models for.
      Returns:
      the list of available models.
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if the request fails.
    • availableAiModels

      @Nonnull public AiModelList availableAiModels()
      Query all foundation models available in SAP AI Core Gen AI Hub for the default resource group.
      Returns:
      the list of available models.
      Throws:
      com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException - if the request fails.