Class RetrievalApi
Grounding is a service designed to handle data-related tasks, such as grounding and retrieval, using vector databases. It provides specialized data retrieval through these databases, grounding the retrieval process with your own external and context-relevant data. Grounding combines generative AI capabilities with the ability to use real-time, precise data to improve decision-making and business operations for specific AI-driven business solutions.
-
Field Summary
Fields inherited from class com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi
apiClient, defaultHeaders -
Constructor Summary
ConstructorsConstructorDescriptionRetrievalApi(com.sap.cloud.sdk.cloudplatform.connectivity.Destination httpDestination) Instantiates this API class to invoke operations on the Grounding.RetrievalApi(com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient apiClient) Instantiates this API class to invoke operations on the Grounding based on a givenApiClient. -
Method Summary
Modifier and TypeMethodDescriptiongetDataRepositories(String aiResourceGroup) List all DataRepository objects.getDataRepositories(String aiResourceGroup, Integer $top, Integer $skip, Boolean $count) List all DataRepository objects.getDataRepositoryById(String aiResourceGroup, UUID repositoryId) List single DataRepository object.getDataRepositoryById(String aiResourceGroup, UUID repositoryId, String remoteName) List single DataRepository object.search(String aiResourceGroup, RetrievalSearchInput retrievalSearchInput) Retrieve relevant contentwithDefaultHeaders(Map<String, String> defaultHeaders) Creates a new API instance with additional default headers.
-
Constructor Details
-
RetrievalApi
public RetrievalApi(@Nonnull com.sap.cloud.sdk.cloudplatform.connectivity.Destination httpDestination) Instantiates this API class to invoke operations on the Grounding.- Parameters:
httpDestination- The destination that API should be used with
-
RetrievalApi
public RetrievalApi(@Nonnull com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient apiClient) Instantiates this API class to invoke operations on the Grounding 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
-
getDataRepositories
@Nonnull public DataRepositories getDataRepositories(@Nonnull String aiResourceGroup, @Nullable Integer $top, @Nullable Integer $skip, @Nullable Boolean $count) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException List all DataRepository objects.List all Data Repositories
200 - Successful Response
400 - The specification of the resource was incorrect
- Parameters:
aiResourceGroup- (required) Resource Group ID$top- (optional) Number of results to display$skip- (optional) Number of results to be skipped from the ordered list of results$count- (optional) When the $count field is set to false, the response contains a count of the items present in the response. When the $count field is set to true, the response contains a count of all the items present on the server, and not just the ones in the response. When the $count field is not passed, it is false by default.- Returns:
- DataRepositories
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
getDataRepositories
@Nonnull public DataRepositories getDataRepositories(@Nonnull String aiResourceGroup) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException List all DataRepository objects.List all Data Repositories
200 - Successful Response
400 - The specification of the resource was incorrect
- Parameters:
aiResourceGroup- Resource Group ID- Returns:
- DataRepositories
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
getDataRepositoryById
@Nonnull public DataRepository getDataRepositoryById(@Nonnull String aiResourceGroup, @Nonnull UUID repositoryId, @Nullable String remoteName) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException List single DataRepository object.List data repository by id
200 - Successful Response
400 - The specification of the resource was incorrect
422 - There are validation issues with the data.
404 - The specification of the resource was incorrect
- Parameters:
aiResourceGroup- (required) Resource Group IDrepositoryId- (required) Repository IDremoteName- (optional) Remote name if DataRepository is from remote DG.- Returns:
- DataRepository
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
getDataRepositoryById
@Nonnull public DataRepository getDataRepositoryById(@Nonnull String aiResourceGroup, @Nonnull UUID repositoryId) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException List single DataRepository object.List data repository by id
200 - Successful Response
400 - The specification of the resource was incorrect
422 - There are validation issues with the data.
404 - The specification of the resource was incorrect
- Parameters:
aiResourceGroup- Resource Group IDrepositoryId- Repository ID- Returns:
- DataRepository
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-
search
@Nonnull public RetrievalSearchResults search(@Nonnull String aiResourceGroup, @Nonnull RetrievalSearchInput retrievalSearchInput) throws com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException Retrieve relevant contentRetrieve relevant content given a query string.
200 - Successful Response
400 - The specification of the resource was incorrect
422 - There are validation issues with the data.
- Parameters:
aiResourceGroup- Resource Group IDretrievalSearchInput- The value for the parameter retrievalSearchInput- Returns:
- RetrievalSearchResults
- Throws:
com.sap.cloud.sdk.services.openapi.apache.core.OpenApiRequestException- if an error occurs while attempting to invoke the API
-