From 7735667edb2a694626d128a1d672cd9b12adb80b Mon Sep 17 00:00:00 2001 From: SAP Cloud SDK Bot Date: Sun, 6 Sep 2026 00:15:26 +0000 Subject: [PATCH 1/3] Update prompt-registry based on main --- .../sdk/prompt/registry/model/LLMModelDetails.java | 12 +++++++++--- .../ai/sdk/prompt/registry/model/LlamaGuard38b.java | 7 ++++++- .../registry/model/LlamaGuard38bFilterConfig.java | 9 ++++++++- .../src/main/resources/spec/prompt-registry.yaml | 7 +++++-- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LLMModelDetails.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LLMModelDetails.java index 507b8d16a..eb44c7949 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LLMModelDetails.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LLMModelDetails.java @@ -169,7 +169,9 @@ public void setParams(@Nullable final Map params) { * Set the timeout of this {@link LLMModelDetails} instance and return the same instance. * * @param timeout Timeout for the LLM request in seconds. This parameter is currently ignored for - * Vertex AI models. Minimum: 1 Maximum: 1200 + * Vertex AI models. Values above 600s may not be honored due to infrastructure connection + * limits; in practice this primarily affects non-streaming calls where the connection may be + * idle while waiting for a response. Minimum: 1 Maximum: 1200 * @return The same instance of this {@link LLMModelDetails} class */ @Nonnull @@ -180,7 +182,9 @@ public LLMModelDetails timeout(@Nullable final Integer timeout) { /** * Timeout for the LLM request in seconds. This parameter is currently ignored for Vertex AI - * models. minimum: 1 maximum: 1200 + * models. Values above 600s may not be honored due to infrastructure connection limits; in + * practice this primarily affects non-streaming calls where the connection may be idle while + * waiting for a response. minimum: 1 maximum: 1200 * * @return timeout The timeout of this {@link LLMModelDetails} instance. */ @@ -193,7 +197,9 @@ public Integer getTimeout() { * Set the timeout of this {@link LLMModelDetails} instance. * * @param timeout Timeout for the LLM request in seconds. This parameter is currently ignored for - * Vertex AI models. Minimum: 1 Maximum: 1200 + * Vertex AI models. Values above 600s may not be honored due to infrastructure connection + * limits; in practice this primarily affects non-streaming calls where the connection may be + * idle while waiting for a response. Minimum: 1 Maximum: 1200 */ public void setTimeout(@Nullable final Integer timeout) { this.timeout = timeout; diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38b.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38b.java index 682d4dcb1..5ddb9cf21 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38b.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38b.java @@ -23,7 +23,12 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -/** Filter configuration for Llama Guard 3 8B */ +/** + * Filter configuration for Llama Guard 3 8B **DEPRECATED**: will be removed 2027-09-20. + * + * @deprecated + */ +@Deprecated // CHECKSTYLE:OFF public class LlamaGuard38b // CHECKSTYLE:ON diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38bFilterConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38bFilterConfig.java index 11948a983..71daecc86 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38bFilterConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38bFilterConfig.java @@ -25,7 +25,12 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; -/** LlamaGuard38bFilterConfig */ +/** + * Filter configuration for Llama Guard 3 8B **DEPRECATED**: will be removed 2027-09-20. + * + * @deprecated + */ +@Deprecated // CHECKSTYLE:OFF public class LlamaGuard38bFilterConfig implements InputFilterConfig, OutputFilterConfig // CHECKSTYLE:ON @@ -143,7 +148,9 @@ public LlamaGuard38bFilterConfig config(@Nonnull final LlamaGuard38b config) { * Get config * * @return config The config of this {@link LlamaGuard38bFilterConfig} instance. + * @deprecated */ + @Deprecated @Nonnull public LlamaGuard38b getConfig() { return config; diff --git a/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml b/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml index 7b2e71edf..faa4c8151 100644 --- a/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml +++ b/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml @@ -1452,7 +1452,7 @@ components: stream_options: include_usage: true timeout: - description: Timeout for the LLM request in seconds. This parameter is currently ignored for Vertex AI models. + description: Timeout for the LLM request in seconds. This parameter is currently ignored for Vertex AI models. Values above 600s may not be honored due to infrastructure connection limits; in practice this primarily affects non-streaming calls where the connection may be idle while waiting for a response. type: integer default: 600 minimum: 1 @@ -1517,7 +1517,8 @@ components: config: $ref: '#/components/schemas/AzureContentSafetyInput' LlamaGuard38b: - description: Filter configuration for Llama Guard 3 8B + deprecated: true + description: 'Filter configuration for Llama Guard 3 8B **DEPRECATED**: will be removed 2027-09-20.' type: object additionalProperties: false minProperties: 1 @@ -1551,6 +1552,8 @@ components: code_interpreter_abuse: type: boolean LlamaGuard38bFilterConfig: + deprecated: true + description: 'Filter configuration for Llama Guard 3 8B **DEPRECATED**: will be removed 2027-09-20.' type: object required: - type From 5aa5241108ae5980775309287b5c55619bc93fb8 Mon Sep 17 00:00:00 2001 From: SAP Cloud SDK Bot Date: Sun, 20 Sep 2026 00:14:13 +0000 Subject: [PATCH 2/3] Update prompt-registry based on main --- .../client/OrchestrationConfigsApi.java | 205 +++++++++++++++ .../registry/client/PromptTemplatesApi.java | 216 ++++++++++++++++ ...hestrationConfigHistoryDeleteResponse.java | 243 ++++++++++++++++++ ...estrationConfigScenarioDeleteResponse.java | 243 ++++++++++++++++++ .../PromptTemplateHistoryDeleteResponse.java | 241 +++++++++++++++++ .../PromptTemplateScenarioDeleteResponse.java | 241 +++++++++++++++++ .../main/resources/spec/prompt-registry.yaml | 168 ++++++++++++ 7 files changed, 1557 insertions(+) create mode 100644 core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigHistoryDeleteResponse.java create mode 100644 core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigScenarioDeleteResponse.java create mode 100644 core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateHistoryDeleteResponse.java create mode 100644 core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateScenarioDeleteResponse.java diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/OrchestrationConfigsApi.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/OrchestrationConfigsApi.java index f546625fe..ff0d44170 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/OrchestrationConfigsApi.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/OrchestrationConfigsApi.java @@ -3,9 +3,11 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.sap.ai.sdk.prompt.registry.model.OrchestrationConfigDeleteResponse; import com.sap.ai.sdk.prompt.registry.model.OrchestrationConfigGetResponse; +import com.sap.ai.sdk.prompt.registry.model.OrchestrationConfigHistoryDeleteResponse; import com.sap.ai.sdk.prompt.registry.model.OrchestrationConfigListResponse; import com.sap.ai.sdk.prompt.registry.model.OrchestrationConfigPostRequest; import com.sap.ai.sdk.prompt.registry.model.OrchestrationConfigPostResponse; +import com.sap.ai.sdk.prompt.registry.model.OrchestrationConfigScenarioDeleteResponse; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; import com.sap.cloud.sdk.services.openapi.apache.apiclient.ApiClient; import com.sap.cloud.sdk.services.openapi.apache.apiclient.BaseApi; @@ -236,6 +238,209 @@ public OrchestrationConfigDeleteResponse deleteOrchestrationConfig( return deleteOrchestrationConfig(orchestrationConfigId, null); } + /** + * Delete all non-current versions (history) for the given orchestration config + * + *

200 - Successful response + * + *

403 - Forbidden Error + * + *

404 - Bad Request + * + *

0 - Common Error + * + * @param scenario (required) The value for the parameter scenario + * @param version (required) The value for the parameter version + * @param name (required) The value for the parameter name + * @param aiResourceGroup (optional) Specify a resource group id to use + * @return OrchestrationConfigHistoryDeleteResponse + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public OrchestrationConfigHistoryDeleteResponse deleteOrchestrationConfigHistory( + @Nonnull final String scenario, + @Nonnull final String version, + @Nonnull final String name, + @Nullable final String aiResourceGroup) + throws OpenApiRequestException { + + // verify the required parameter 'scenario' is set + if (scenario == null) { + throw new OpenApiRequestException( + "Missing the required parameter 'scenario' when calling deleteOrchestrationConfigHistory") + .statusCode(400); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new OpenApiRequestException( + "Missing the required parameter 'version' when calling deleteOrchestrationConfigHistory") + .statusCode(400); + } + + // verify the required parameter 'name' is set + if (name == null) { + throw new OpenApiRequestException( + "Missing the required parameter 'name' when calling deleteOrchestrationConfigHistory") + .statusCode(400); + } + + // create path and map variables + final String localVarPath = + "/registry/v2/scenarios/{scenario}/orchestrationConfigs/{name}/versions/{version}/history" + .replaceAll( + "\\{" + "scenario" + "\\}", + ApiClient.escapeString(ApiClient.parameterToString(scenario))) + .replaceAll( + "\\{" + "version" + "\\}", + ApiClient.escapeString(ApiClient.parameterToString(version))) + .replaceAll( + "\\{" + "name" + "\\}", ApiClient.escapeString(ApiClient.parameterToString(name))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList(); + final List localVarCollectionQueryParams = new ArrayList(); + final Map localVarHeaderParams = new HashMap(defaultHeaders); + final Map localVarFormParams = new HashMap(); + + if (aiResourceGroup != null) + localVarHeaderParams.put("AI-Resource-Group", ApiClient.parameterToString(aiResourceGroup)); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = {}; + + final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); + + final TypeReference localVarReturnType = + new TypeReference() {}; + + return apiClient.invokeAPI( + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + null, + localVarHeaderParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarReturnType); + } + + /** + * Delete all non-current versions (history) for the given orchestration config + * + *

200 - Successful response + * + *

403 - Forbidden Error + * + *

404 - Bad Request + * + *

0 - Common Error + * + * @param scenario The value for the parameter scenario + * @param version The value for the parameter version + * @param name The value for the parameter name + * @return OrchestrationConfigHistoryDeleteResponse + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public OrchestrationConfigHistoryDeleteResponse deleteOrchestrationConfigHistory( + @Nonnull final String scenario, @Nonnull final String version, @Nonnull final String name) + throws OpenApiRequestException { + return deleteOrchestrationConfigHistory(scenario, version, name, null); + } + + /** + * Delete all imperative orchestration configs in the given scenario. + * + *

200 - Successful response + * + *

403 - Forbidden Error + * + *

404 - Bad Request + * + *

0 - Common Error + * + * @param scenario (required) The value for the parameter scenario + * @param aiResourceGroup (optional) Specify a resource group id to use + * @return OrchestrationConfigScenarioDeleteResponse + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public OrchestrationConfigScenarioDeleteResponse deleteOrchestrationConfigsByScenario( + @Nonnull final String scenario, @Nullable final String aiResourceGroup) + throws OpenApiRequestException { + + // verify the required parameter 'scenario' is set + if (scenario == null) { + throw new OpenApiRequestException( + "Missing the required parameter 'scenario' when calling deleteOrchestrationConfigsByScenario") + .statusCode(400); + } + + // create path and map variables + final String localVarPath = + "/registry/v2/scenarios/{scenario}/orchestrationConfigs" + .replaceAll( + "\\{" + "scenario" + "\\}", + ApiClient.escapeString(ApiClient.parameterToString(scenario))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList(); + final List localVarCollectionQueryParams = new ArrayList(); + final Map localVarHeaderParams = new HashMap(defaultHeaders); + final Map localVarFormParams = new HashMap(); + + if (aiResourceGroup != null) + localVarHeaderParams.put("AI-Resource-Group", ApiClient.parameterToString(aiResourceGroup)); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = {}; + + final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); + + final TypeReference localVarReturnType = + new TypeReference() {}; + + return apiClient.invokeAPI( + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + null, + localVarHeaderParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarReturnType); + } + + /** + * Delete all imperative orchestration configs in the given scenario. + * + *

200 - Successful response + * + *

403 - Forbidden Error + * + *

404 - Bad Request + * + *

0 - Common Error + * + * @param scenario The value for the parameter scenario + * @return OrchestrationConfigScenarioDeleteResponse + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public OrchestrationConfigScenarioDeleteResponse deleteOrchestrationConfigsByScenario( + @Nonnull final String scenario) throws OpenApiRequestException { + return deleteOrchestrationConfigsByScenario(scenario, null); + } + /** * Export orchestration config * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/PromptTemplatesApi.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/PromptTemplatesApi.java index 841aecbd5..f2f44b005 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/PromptTemplatesApi.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/PromptTemplatesApi.java @@ -3,9 +3,11 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.sap.ai.sdk.prompt.registry.model.PromptTemplateDeleteResponse; import com.sap.ai.sdk.prompt.registry.model.PromptTemplateGetResponse; +import com.sap.ai.sdk.prompt.registry.model.PromptTemplateHistoryDeleteResponse; import com.sap.ai.sdk.prompt.registry.model.PromptTemplateListResponse; import com.sap.ai.sdk.prompt.registry.model.PromptTemplatePostRequest; import com.sap.ai.sdk.prompt.registry.model.PromptTemplatePostResponse; +import com.sap.ai.sdk.prompt.registry.model.PromptTemplateScenarioDeleteResponse; import com.sap.ai.sdk.prompt.registry.model.PromptTemplateSubstitutionRequest; import com.sap.ai.sdk.prompt.registry.model.PromptTemplateSubstitutionResponse; import com.sap.cloud.sdk.cloudplatform.connectivity.Destination; @@ -247,6 +249,220 @@ public PromptTemplateDeleteResponse deletePromptTemplate(@Nonnull final UUID pro return deletePromptTemplate(promptTemplateId, null, null); } + /** + * Delete all non-current versions (history) for the given prompt template + * + *

200 - Successful response + * + *

403 - Forbidden Error + * + *

404 - Bad Request + * + *

0 - Common Error + * + * @param scenario (required) The value for the parameter scenario + * @param version (required) The value for the parameter version + * @param name (required) The value for the parameter name + * @param aiResourceGroup (optional) Specify a resource group id to use + * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used + * @return PromptTemplateHistoryDeleteResponse + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public PromptTemplateHistoryDeleteResponse deletePromptTemplateHistory( + @Nonnull final String scenario, + @Nonnull final String version, + @Nonnull final String name, + @Nullable final String aiResourceGroup, + @Nullable final String aiResourceGroupScope) + throws OpenApiRequestException { + + // verify the required parameter 'scenario' is set + if (scenario == null) { + throw new OpenApiRequestException( + "Missing the required parameter 'scenario' when calling deletePromptTemplateHistory") + .statusCode(400); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new OpenApiRequestException( + "Missing the required parameter 'version' when calling deletePromptTemplateHistory") + .statusCode(400); + } + + // verify the required parameter 'name' is set + if (name == null) { + throw new OpenApiRequestException( + "Missing the required parameter 'name' when calling deletePromptTemplateHistory") + .statusCode(400); + } + + // create path and map variables + final String localVarPath = + "/lm/scenarios/{scenario}/promptTemplates/{name}/versions/{version}/history" + .replaceAll( + "\\{" + "scenario" + "\\}", + ApiClient.escapeString(ApiClient.parameterToString(scenario))) + .replaceAll( + "\\{" + "version" + "\\}", + ApiClient.escapeString(ApiClient.parameterToString(version))) + .replaceAll( + "\\{" + "name" + "\\}", ApiClient.escapeString(ApiClient.parameterToString(name))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList(); + final List localVarCollectionQueryParams = new ArrayList(); + final Map localVarHeaderParams = new HashMap(defaultHeaders); + final Map localVarFormParams = new HashMap(); + + if (aiResourceGroup != null) + localVarHeaderParams.put("AI-Resource-Group", ApiClient.parameterToString(aiResourceGroup)); + if (aiResourceGroupScope != null) + localVarHeaderParams.put( + "AI-Resource-Group-Scope", ApiClient.parameterToString(aiResourceGroupScope)); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = {}; + + final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); + + final TypeReference localVarReturnType = + new TypeReference() {}; + + return apiClient.invokeAPI( + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + null, + localVarHeaderParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarReturnType); + } + + /** + * Delete all non-current versions (history) for the given prompt template + * + *

200 - Successful response + * + *

403 - Forbidden Error + * + *

404 - Bad Request + * + *

0 - Common Error + * + * @param scenario The value for the parameter scenario + * @param version The value for the parameter version + * @param name The value for the parameter name + * @return PromptTemplateHistoryDeleteResponse + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public PromptTemplateHistoryDeleteResponse deletePromptTemplateHistory( + @Nonnull final String scenario, @Nonnull final String version, @Nonnull final String name) + throws OpenApiRequestException { + return deletePromptTemplateHistory(scenario, version, name, null, null); + } + + /** + * Delete all imperative prompt templates in the given scenario. + * + *

200 - Successful response + * + *

403 - Forbidden Error + * + *

404 - Bad Request + * + *

0 - Common Error + * + * @param scenario (required) The value for the parameter scenario + * @param aiResourceGroup (optional) Specify a resource group id to use + * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used + * @return PromptTemplateScenarioDeleteResponse + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public PromptTemplateScenarioDeleteResponse deletePromptTemplatesByScenario( + @Nonnull final String scenario, + @Nullable final String aiResourceGroup, + @Nullable final String aiResourceGroupScope) + throws OpenApiRequestException { + + // verify the required parameter 'scenario' is set + if (scenario == null) { + throw new OpenApiRequestException( + "Missing the required parameter 'scenario' when calling deletePromptTemplatesByScenario") + .statusCode(400); + } + + // create path and map variables + final String localVarPath = + "/lm/scenarios/{scenario}/promptTemplates" + .replaceAll( + "\\{" + "scenario" + "\\}", + ApiClient.escapeString(ApiClient.parameterToString(scenario))); + + final StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + final List localVarQueryParams = new ArrayList(); + final List localVarCollectionQueryParams = new ArrayList(); + final Map localVarHeaderParams = new HashMap(defaultHeaders); + final Map localVarFormParams = new HashMap(); + + if (aiResourceGroup != null) + localVarHeaderParams.put("AI-Resource-Group", ApiClient.parameterToString(aiResourceGroup)); + if (aiResourceGroupScope != null) + localVarHeaderParams.put( + "AI-Resource-Group-Scope", ApiClient.parameterToString(aiResourceGroupScope)); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = {}; + + final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes); + + final TypeReference localVarReturnType = + new TypeReference() {}; + + return apiClient.invokeAPI( + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + null, + localVarHeaderParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarReturnType); + } + + /** + * Delete all imperative prompt templates in the given scenario. + * + *

200 - Successful response + * + *

403 - Forbidden Error + * + *

404 - Bad Request + * + *

0 - Common Error + * + * @param scenario The value for the parameter scenario + * @return PromptTemplateScenarioDeleteResponse + * @throws OpenApiRequestException if an error occurs while attempting to invoke the API + */ + @Nonnull + public PromptTemplateScenarioDeleteResponse deletePromptTemplatesByScenario( + @Nonnull final String scenario) throws OpenApiRequestException { + return deletePromptTemplatesByScenario(scenario, null, null); + } + /** * Export prompt template * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigHistoryDeleteResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigHistoryDeleteResponse.java new file mode 100644 index 000000000..2187c4393 --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigHistoryDeleteResponse.java @@ -0,0 +1,243 @@ +/* + * Prompt Registry API + * Prompt Storage service for Design time & Runtime prompt templates. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.ai.sdk.prompt.registry.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Set; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** OrchestrationConfigHistoryDeleteResponse */ +// CHECKSTYLE:OFF +public class OrchestrationConfigHistoryDeleteResponse +// CHECKSTYLE:ON +{ + @JsonProperty("message") + private String message; + + @JsonProperty("deleted") + private Integer deleted; + + @JsonAnySetter @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** Default constructor for OrchestrationConfigHistoryDeleteResponse. */ + protected OrchestrationConfigHistoryDeleteResponse() {} + + /** + * Set the message of this {@link OrchestrationConfigHistoryDeleteResponse} instance and return + * the same instance. + * + * @param message The message of this {@link OrchestrationConfigHistoryDeleteResponse} + * @return The same instance of this {@link OrchestrationConfigHistoryDeleteResponse} class + */ + @Nonnull + public OrchestrationConfigHistoryDeleteResponse message(@Nonnull final String message) { + this.message = message; + return this; + } + + /** + * Get message + * + * @return message The message of this {@link OrchestrationConfigHistoryDeleteResponse} instance. + */ + @Nonnull + public String getMessage() { + return message; + } + + /** + * Set the message of this {@link OrchestrationConfigHistoryDeleteResponse} instance. + * + * @param message The message of this {@link OrchestrationConfigHistoryDeleteResponse} + */ + public void setMessage(@Nonnull final String message) { + this.message = message; + } + + /** + * Set the deleted of this {@link OrchestrationConfigHistoryDeleteResponse} instance and return + * the same instance. + * + * @param deleted The deleted of this {@link OrchestrationConfigHistoryDeleteResponse} + * @return The same instance of this {@link OrchestrationConfigHistoryDeleteResponse} class + */ + @Nonnull + public OrchestrationConfigHistoryDeleteResponse deleted(@Nonnull final Integer deleted) { + this.deleted = deleted; + return this; + } + + /** + * Get deleted + * + * @return deleted The deleted of this {@link OrchestrationConfigHistoryDeleteResponse} instance. + */ + @Nonnull + public Integer getDeleted() { + return deleted; + } + + /** + * Set the deleted of this {@link OrchestrationConfigHistoryDeleteResponse} instance. + * + * @param deleted The deleted of this {@link OrchestrationConfigHistoryDeleteResponse} + */ + public void setDeleted(@Nonnull final Integer deleted) { + this.deleted = deleted; + } + + /** + * Get the names of the unrecognizable properties of the {@link + * OrchestrationConfigHistoryDeleteResponse}. + * + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link + * OrchestrationConfigHistoryDeleteResponse} instance. + * + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { + if (!cloudSdkCustomFields.containsKey(name)) { + throw new NoSuchElementException( + "OrchestrationConfigHistoryDeleteResponse has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link OrchestrationConfigHistoryDeleteResponse} + * instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if (message != null) declaredFields.put("message", message); + if (deleted != null) declaredFields.put("deleted", deleted); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link OrchestrationConfigHistoryDeleteResponse} + * instance. If the map previously contained a mapping for the key, the old value is replaced by + * the specified value. + * + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final OrchestrationConfigHistoryDeleteResponse orchestrationConfigHistoryDeleteResponse = + (OrchestrationConfigHistoryDeleteResponse) o; + return Objects.equals( + this.cloudSdkCustomFields, + orchestrationConfigHistoryDeleteResponse.cloudSdkCustomFields) + && Objects.equals(this.message, orchestrationConfigHistoryDeleteResponse.message) + && Objects.equals(this.deleted, orchestrationConfigHistoryDeleteResponse.deleted); + } + + @Override + public int hashCode() { + return Objects.hash(message, deleted, cloudSdkCustomFields); + } + + @Override + @Nonnull + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class OrchestrationConfigHistoryDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + cloudSdkCustomFields.forEach( + (k, v) -> + sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create a type-safe, fluent-api builder object to construct a new {@link + * OrchestrationConfigHistoryDeleteResponse} instance with all required arguments. + */ + public static Builder create() { + return (message) -> + (deleted) -> + new OrchestrationConfigHistoryDeleteResponse().message(message).deleted(deleted); + } + + /** Builder helper class. */ + public interface Builder { + /** + * Set the message of this {@link OrchestrationConfigHistoryDeleteResponse} instance. + * + * @param message The message of this {@link OrchestrationConfigHistoryDeleteResponse} + * @return The OrchestrationConfigHistoryDeleteResponse builder. + */ + Builder1 message(@Nonnull final String message); + } + + /** Builder helper class. */ + public interface Builder1 { + /** + * Set the deleted of this {@link OrchestrationConfigHistoryDeleteResponse} instance. + * + * @param deleted The deleted of this {@link OrchestrationConfigHistoryDeleteResponse} + * @return The OrchestrationConfigHistoryDeleteResponse instance. + */ + OrchestrationConfigHistoryDeleteResponse deleted(@Nonnull final Integer deleted); + } +} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigScenarioDeleteResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigScenarioDeleteResponse.java new file mode 100644 index 000000000..f01587be1 --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigScenarioDeleteResponse.java @@ -0,0 +1,243 @@ +/* + * Prompt Registry API + * Prompt Storage service for Design time & Runtime prompt templates. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.ai.sdk.prompt.registry.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Set; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** OrchestrationConfigScenarioDeleteResponse */ +// CHECKSTYLE:OFF +public class OrchestrationConfigScenarioDeleteResponse +// CHECKSTYLE:ON +{ + @JsonProperty("message") + private String message; + + @JsonProperty("deleted") + private Integer deleted; + + @JsonAnySetter @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** Default constructor for OrchestrationConfigScenarioDeleteResponse. */ + protected OrchestrationConfigScenarioDeleteResponse() {} + + /** + * Set the message of this {@link OrchestrationConfigScenarioDeleteResponse} instance and return + * the same instance. + * + * @param message The message of this {@link OrchestrationConfigScenarioDeleteResponse} + * @return The same instance of this {@link OrchestrationConfigScenarioDeleteResponse} class + */ + @Nonnull + public OrchestrationConfigScenarioDeleteResponse message(@Nonnull final String message) { + this.message = message; + return this; + } + + /** + * Get message + * + * @return message The message of this {@link OrchestrationConfigScenarioDeleteResponse} instance. + */ + @Nonnull + public String getMessage() { + return message; + } + + /** + * Set the message of this {@link OrchestrationConfigScenarioDeleteResponse} instance. + * + * @param message The message of this {@link OrchestrationConfigScenarioDeleteResponse} + */ + public void setMessage(@Nonnull final String message) { + this.message = message; + } + + /** + * Set the deleted of this {@link OrchestrationConfigScenarioDeleteResponse} instance and return + * the same instance. + * + * @param deleted The deleted of this {@link OrchestrationConfigScenarioDeleteResponse} + * @return The same instance of this {@link OrchestrationConfigScenarioDeleteResponse} class + */ + @Nonnull + public OrchestrationConfigScenarioDeleteResponse deleted(@Nonnull final Integer deleted) { + this.deleted = deleted; + return this; + } + + /** + * Get deleted + * + * @return deleted The deleted of this {@link OrchestrationConfigScenarioDeleteResponse} instance. + */ + @Nonnull + public Integer getDeleted() { + return deleted; + } + + /** + * Set the deleted of this {@link OrchestrationConfigScenarioDeleteResponse} instance. + * + * @param deleted The deleted of this {@link OrchestrationConfigScenarioDeleteResponse} + */ + public void setDeleted(@Nonnull final Integer deleted) { + this.deleted = deleted; + } + + /** + * Get the names of the unrecognizable properties of the {@link + * OrchestrationConfigScenarioDeleteResponse}. + * + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link + * OrchestrationConfigScenarioDeleteResponse} instance. + * + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { + if (!cloudSdkCustomFields.containsKey(name)) { + throw new NoSuchElementException( + "OrchestrationConfigScenarioDeleteResponse has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link OrchestrationConfigScenarioDeleteResponse} + * instance including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if (message != null) declaredFields.put("message", message); + if (deleted != null) declaredFields.put("deleted", deleted); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link OrchestrationConfigScenarioDeleteResponse} + * instance. If the map previously contained a mapping for the key, the old value is replaced by + * the specified value. + * + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final OrchestrationConfigScenarioDeleteResponse orchestrationConfigScenarioDeleteResponse = + (OrchestrationConfigScenarioDeleteResponse) o; + return Objects.equals( + this.cloudSdkCustomFields, + orchestrationConfigScenarioDeleteResponse.cloudSdkCustomFields) + && Objects.equals(this.message, orchestrationConfigScenarioDeleteResponse.message) + && Objects.equals(this.deleted, orchestrationConfigScenarioDeleteResponse.deleted); + } + + @Override + public int hashCode() { + return Objects.hash(message, deleted, cloudSdkCustomFields); + } + + @Override + @Nonnull + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class OrchestrationConfigScenarioDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + cloudSdkCustomFields.forEach( + (k, v) -> + sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create a type-safe, fluent-api builder object to construct a new {@link + * OrchestrationConfigScenarioDeleteResponse} instance with all required arguments. + */ + public static Builder create() { + return (message) -> + (deleted) -> + new OrchestrationConfigScenarioDeleteResponse().message(message).deleted(deleted); + } + + /** Builder helper class. */ + public interface Builder { + /** + * Set the message of this {@link OrchestrationConfigScenarioDeleteResponse} instance. + * + * @param message The message of this {@link OrchestrationConfigScenarioDeleteResponse} + * @return The OrchestrationConfigScenarioDeleteResponse builder. + */ + Builder1 message(@Nonnull final String message); + } + + /** Builder helper class. */ + public interface Builder1 { + /** + * Set the deleted of this {@link OrchestrationConfigScenarioDeleteResponse} instance. + * + * @param deleted The deleted of this {@link OrchestrationConfigScenarioDeleteResponse} + * @return The OrchestrationConfigScenarioDeleteResponse instance. + */ + OrchestrationConfigScenarioDeleteResponse deleted(@Nonnull final Integer deleted); + } +} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateHistoryDeleteResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateHistoryDeleteResponse.java new file mode 100644 index 000000000..19580ec82 --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateHistoryDeleteResponse.java @@ -0,0 +1,241 @@ +/* + * Prompt Registry API + * Prompt Storage service for Design time & Runtime prompt templates. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.ai.sdk.prompt.registry.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Set; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** PromptTemplateHistoryDeleteResponse */ +// CHECKSTYLE:OFF +public class PromptTemplateHistoryDeleteResponse +// CHECKSTYLE:ON +{ + @JsonProperty("message") + private String message; + + @JsonProperty("deleted") + private Integer deleted; + + @JsonAnySetter @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** Default constructor for PromptTemplateHistoryDeleteResponse. */ + protected PromptTemplateHistoryDeleteResponse() {} + + /** + * Set the message of this {@link PromptTemplateHistoryDeleteResponse} instance and return the + * same instance. + * + * @param message The message of this {@link PromptTemplateHistoryDeleteResponse} + * @return The same instance of this {@link PromptTemplateHistoryDeleteResponse} class + */ + @Nonnull + public PromptTemplateHistoryDeleteResponse message(@Nonnull final String message) { + this.message = message; + return this; + } + + /** + * Get message + * + * @return message The message of this {@link PromptTemplateHistoryDeleteResponse} instance. + */ + @Nonnull + public String getMessage() { + return message; + } + + /** + * Set the message of this {@link PromptTemplateHistoryDeleteResponse} instance. + * + * @param message The message of this {@link PromptTemplateHistoryDeleteResponse} + */ + public void setMessage(@Nonnull final String message) { + this.message = message; + } + + /** + * Set the deleted of this {@link PromptTemplateHistoryDeleteResponse} instance and return the + * same instance. + * + * @param deleted The deleted of this {@link PromptTemplateHistoryDeleteResponse} + * @return The same instance of this {@link PromptTemplateHistoryDeleteResponse} class + */ + @Nonnull + public PromptTemplateHistoryDeleteResponse deleted(@Nonnull final Integer deleted) { + this.deleted = deleted; + return this; + } + + /** + * Get deleted + * + * @return deleted The deleted of this {@link PromptTemplateHistoryDeleteResponse} instance. + */ + @Nonnull + public Integer getDeleted() { + return deleted; + } + + /** + * Set the deleted of this {@link PromptTemplateHistoryDeleteResponse} instance. + * + * @param deleted The deleted of this {@link PromptTemplateHistoryDeleteResponse} + */ + public void setDeleted(@Nonnull final Integer deleted) { + this.deleted = deleted; + } + + /** + * Get the names of the unrecognizable properties of the {@link + * PromptTemplateHistoryDeleteResponse}. + * + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link PromptTemplateHistoryDeleteResponse} + * instance. + * + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { + if (!cloudSdkCustomFields.containsKey(name)) { + throw new NoSuchElementException( + "PromptTemplateHistoryDeleteResponse has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link PromptTemplateHistoryDeleteResponse} instance + * including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if (message != null) declaredFields.put("message", message); + if (deleted != null) declaredFields.put("deleted", deleted); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link PromptTemplateHistoryDeleteResponse} instance. If + * the map previously contained a mapping for the key, the old value is replaced by the specified + * value. + * + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final PromptTemplateHistoryDeleteResponse promptTemplateHistoryDeleteResponse = + (PromptTemplateHistoryDeleteResponse) o; + return Objects.equals( + this.cloudSdkCustomFields, promptTemplateHistoryDeleteResponse.cloudSdkCustomFields) + && Objects.equals(this.message, promptTemplateHistoryDeleteResponse.message) + && Objects.equals(this.deleted, promptTemplateHistoryDeleteResponse.deleted); + } + + @Override + public int hashCode() { + return Objects.hash(message, deleted, cloudSdkCustomFields); + } + + @Override + @Nonnull + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class PromptTemplateHistoryDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + cloudSdkCustomFields.forEach( + (k, v) -> + sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create a type-safe, fluent-api builder object to construct a new {@link + * PromptTemplateHistoryDeleteResponse} instance with all required arguments. + */ + public static Builder create() { + return (message) -> + (deleted) -> new PromptTemplateHistoryDeleteResponse().message(message).deleted(deleted); + } + + /** Builder helper class. */ + public interface Builder { + /** + * Set the message of this {@link PromptTemplateHistoryDeleteResponse} instance. + * + * @param message The message of this {@link PromptTemplateHistoryDeleteResponse} + * @return The PromptTemplateHistoryDeleteResponse builder. + */ + Builder1 message(@Nonnull final String message); + } + + /** Builder helper class. */ + public interface Builder1 { + /** + * Set the deleted of this {@link PromptTemplateHistoryDeleteResponse} instance. + * + * @param deleted The deleted of this {@link PromptTemplateHistoryDeleteResponse} + * @return The PromptTemplateHistoryDeleteResponse instance. + */ + PromptTemplateHistoryDeleteResponse deleted(@Nonnull final Integer deleted); + } +} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateScenarioDeleteResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateScenarioDeleteResponse.java new file mode 100644 index 000000000..20ba0b6c3 --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateScenarioDeleteResponse.java @@ -0,0 +1,241 @@ +/* + * Prompt Registry API + * Prompt Storage service for Design time & Runtime prompt templates. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.ai.sdk.prompt.registry.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Set; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** PromptTemplateScenarioDeleteResponse */ +// CHECKSTYLE:OFF +public class PromptTemplateScenarioDeleteResponse +// CHECKSTYLE:ON +{ + @JsonProperty("message") + private String message; + + @JsonProperty("deleted") + private Integer deleted; + + @JsonAnySetter @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** Default constructor for PromptTemplateScenarioDeleteResponse. */ + protected PromptTemplateScenarioDeleteResponse() {} + + /** + * Set the message of this {@link PromptTemplateScenarioDeleteResponse} instance and return the + * same instance. + * + * @param message The message of this {@link PromptTemplateScenarioDeleteResponse} + * @return The same instance of this {@link PromptTemplateScenarioDeleteResponse} class + */ + @Nonnull + public PromptTemplateScenarioDeleteResponse message(@Nonnull final String message) { + this.message = message; + return this; + } + + /** + * Get message + * + * @return message The message of this {@link PromptTemplateScenarioDeleteResponse} instance. + */ + @Nonnull + public String getMessage() { + return message; + } + + /** + * Set the message of this {@link PromptTemplateScenarioDeleteResponse} instance. + * + * @param message The message of this {@link PromptTemplateScenarioDeleteResponse} + */ + public void setMessage(@Nonnull final String message) { + this.message = message; + } + + /** + * Set the deleted of this {@link PromptTemplateScenarioDeleteResponse} instance and return the + * same instance. + * + * @param deleted The deleted of this {@link PromptTemplateScenarioDeleteResponse} + * @return The same instance of this {@link PromptTemplateScenarioDeleteResponse} class + */ + @Nonnull + public PromptTemplateScenarioDeleteResponse deleted(@Nonnull final Integer deleted) { + this.deleted = deleted; + return this; + } + + /** + * Get deleted + * + * @return deleted The deleted of this {@link PromptTemplateScenarioDeleteResponse} instance. + */ + @Nonnull + public Integer getDeleted() { + return deleted; + } + + /** + * Set the deleted of this {@link PromptTemplateScenarioDeleteResponse} instance. + * + * @param deleted The deleted of this {@link PromptTemplateScenarioDeleteResponse} + */ + public void setDeleted(@Nonnull final Integer deleted) { + this.deleted = deleted; + } + + /** + * Get the names of the unrecognizable properties of the {@link + * PromptTemplateScenarioDeleteResponse}. + * + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link + * PromptTemplateScenarioDeleteResponse} instance. + * + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { + if (!cloudSdkCustomFields.containsKey(name)) { + throw new NoSuchElementException( + "PromptTemplateScenarioDeleteResponse has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link PromptTemplateScenarioDeleteResponse} instance + * including unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if (message != null) declaredFields.put("message", message); + if (deleted != null) declaredFields.put("deleted", deleted); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link PromptTemplateScenarioDeleteResponse} instance. + * If the map previously contained a mapping for the key, the old value is replaced by the + * specified value. + * + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final PromptTemplateScenarioDeleteResponse promptTemplateScenarioDeleteResponse = + (PromptTemplateScenarioDeleteResponse) o; + return Objects.equals( + this.cloudSdkCustomFields, promptTemplateScenarioDeleteResponse.cloudSdkCustomFields) + && Objects.equals(this.message, promptTemplateScenarioDeleteResponse.message) + && Objects.equals(this.deleted, promptTemplateScenarioDeleteResponse.deleted); + } + + @Override + public int hashCode() { + return Objects.hash(message, deleted, cloudSdkCustomFields); + } + + @Override + @Nonnull + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class PromptTemplateScenarioDeleteResponse {\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" deleted: ").append(toIndentedString(deleted)).append("\n"); + cloudSdkCustomFields.forEach( + (k, v) -> + sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create a type-safe, fluent-api builder object to construct a new {@link + * PromptTemplateScenarioDeleteResponse} instance with all required arguments. + */ + public static Builder create() { + return (message) -> + (deleted) -> new PromptTemplateScenarioDeleteResponse().message(message).deleted(deleted); + } + + /** Builder helper class. */ + public interface Builder { + /** + * Set the message of this {@link PromptTemplateScenarioDeleteResponse} instance. + * + * @param message The message of this {@link PromptTemplateScenarioDeleteResponse} + * @return The PromptTemplateScenarioDeleteResponse builder. + */ + Builder1 message(@Nonnull final String message); + } + + /** Builder helper class. */ + public interface Builder1 { + /** + * Set the deleted of this {@link PromptTemplateScenarioDeleteResponse} instance. + * + * @param deleted The deleted of this {@link PromptTemplateScenarioDeleteResponse} + * @return The PromptTemplateScenarioDeleteResponse instance. + */ + PromptTemplateScenarioDeleteResponse deleted(@Nonnull final Integer deleted); + } +} diff --git a/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml b/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml index faa4c8151..a3b4ee8e3 100644 --- a/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml +++ b/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml @@ -91,7 +91,72 @@ paths: $ref: '#/components/responses/PayloadTooLarge' default: $ref: '#/components/responses/CommonError' + /lm/scenarios/{scenario}/promptTemplates: + delete: + operationId: registry.controller.prompt_controller.delete_prompt_templates_by_scenario + x-sap-cloud-sdk-operation-name: deletePromptTemplatesByScenario + description: Delete all imperative prompt templates in the given scenario. + tags: + - prompt templates + parameters: + - $ref: '#/components/parameters/ai-resource-group' + - $ref: '#/components/parameters/ai-resource-group-scope' + - name: scenario + in: path + required: true + schema: + type: string + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplateScenarioDeleteResponse' + '403': + $ref: '#/components/responses/ForbiddenError' + '404': + $ref: '#/components/responses/NotFound' + default: + $ref: '#/components/responses/CommonError' /lm/scenarios/{scenario}/promptTemplates/{name}/versions/{version}/history: + delete: + operationId: registry.controller.prompt_controller.delete_prompt_template_history + x-sap-cloud-sdk-operation-name: deletePromptTemplateHistory + description: Delete all non-current versions (history) for the given prompt template + tags: + - prompt templates + parameters: + - $ref: '#/components/parameters/ai-resource-group' + - $ref: '#/components/parameters/ai-resource-group-scope' + - name: scenario + in: path + required: true + schema: + type: string + - name: version + in: path + required: true + schema: + type: string + - name: name + in: path + required: true + schema: + type: string + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/PromptTemplateHistoryDeleteResponse' + '403': + $ref: '#/components/responses/ForbiddenError' + '404': + $ref: '#/components/responses/NotFound' + default: + $ref: '#/components/responses/CommonError' get: operationId: registry.controller.prompt_controller.list_prompt_template_history x-sap-cloud-sdk-operation-name: listPromptTemplateHistory @@ -441,7 +506,70 @@ paths: $ref: '#/components/responses/PayloadTooLarge' default: $ref: '#/components/responses/CommonError' + /registry/v2/scenarios/{scenario}/orchestrationConfigs: + delete: + operationId: registry.controller.orchestration_config_controller.delete_orchestration_configs_by_scenario + x-sap-cloud-sdk-operation-name: deleteOrchestrationConfigsByScenario + description: Delete all imperative orchestration configs in the given scenario. + tags: + - orchestration configs + parameters: + - $ref: '#/components/parameters/ai-resource-group' + - name: scenario + in: path + required: true + schema: + type: string + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/OrchestrationConfigScenarioDeleteResponse' + '403': + $ref: '#/components/responses/ForbiddenError' + '404': + $ref: '#/components/responses/NotFound' + default: + $ref: '#/components/responses/CommonError' /registry/v2/scenarios/{scenario}/orchestrationConfigs/{name}/versions/{version}/history: + delete: + operationId: registry.controller.orchestration_config_controller.delete_orchestration_config_history + x-sap-cloud-sdk-operation-name: deleteOrchestrationConfigHistory + description: Delete all non-current versions (history) for the given orchestration config + tags: + - orchestration configs + parameters: + - $ref: '#/components/parameters/ai-resource-group' + - name: scenario + in: path + required: true + schema: + type: string + - name: version + in: path + required: true + schema: + type: string + - name: name + in: path + required: true + schema: + type: string + responses: + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/OrchestrationConfigHistoryDeleteResponse' + '403': + $ref: '#/components/responses/ForbiddenError' + '404': + $ref: '#/components/responses/NotFound' + default: + $ref: '#/components/responses/CommonError' get: operationId: registry.controller.orchestration_config_controller.list_orchestration_config_history x-sap-cloud-sdk-operation-name: listOrchestrationConfigHistory @@ -913,6 +1041,26 @@ components: properties: message: type: string + PromptTemplateHistoryDeleteResponse: + type: object + required: + - message + - deleted + properties: + message: + type: string + deleted: + type: integer + PromptTemplateScenarioDeleteResponse: + type: object + required: + - message + - deleted + properties: + message: + type: string + deleted: + type: integer RuntimePromptTemplateFile: type: object properties: @@ -1074,6 +1222,26 @@ components: properties: message: type: string + OrchestrationConfigHistoryDeleteResponse: + type: object + required: + - message + - deleted + properties: + message: + type: string + deleted: + type: integer + OrchestrationConfigScenarioDeleteResponse: + type: object + required: + - message + - deleted + properties: + message: + type: string + deleted: + type: integer RuntimeOrchestrationConfigFile: type: object properties: From 3fb1a421fcc6fd8ee6bf1841cc0216b680cb4126 Mon Sep 17 00:00:00 2001 From: SAP Cloud SDK Bot Date: Sun, 4 Oct 2026 00:58:39 +0000 Subject: [PATCH 3/3] Update prompt-registry based on main --- .../client/OrchestrationConfigsApi.java | 156 ++++--- .../registry/client/PromptTemplatesApi.java | 176 +++++--- .../model/AfterLastRoleTargetSelector.java | 266 +++++++++++ .../registry/model/AssistantChatMessage.java | 4 +- .../model/AzureContentSafetyInput.java | 4 +- .../AzureContentSafetyInputFilterConfig.java | 48 +- .../model/AzureContentSafetyOutput.java | 4 +- .../AzureContentSafetyOutputFilterConfig.java | 4 +- .../prompt/registry/model/AzureThreshold.java | 4 +- .../prompt/registry/model/CacheControl.java | 4 +- .../registry/model/ChatCompletionTool.java | 4 +- .../prompt/registry/model/ChatMessage.java | 4 +- .../registry/model/ChatMessageContent.java | 4 +- .../sdk/prompt/registry/model/DPIConfig.java | 4 +- .../model/DPIConfigMaskGroundingInput.java | 4 +- .../registry/model/DPICustomEntity.java | 4 +- .../prompt/registry/model/DPIEntities.java | 4 +- .../registry/model/DPIEntityConfig.java | 4 +- .../registry/model/DPIMethodConstant.java | 4 +- .../model/DPIMethodFabricatedData.java | 4 +- .../registry/model/DPIStandardEntity.java | 4 +- .../DPIStandardEntityReplacementStrategy.java | 4 +- .../registry/model/DataRepositoryType.java | 4 +- .../registry/model/DeveloperChatMessage.java | 4 +- .../model/DocumentGroundingFilter.java | 4 +- .../prompt/registry/model/ErrorResponse.java | 4 +- .../prompt/registry/model/FileContent.java | 4 +- .../registry/model/FilteringModuleConfig.java | 4 +- .../model/FilteringStreamOptions.java | 4 +- .../prompt/registry/model/FunctionObject.java | 4 +- .../registry/model/GlobalStreamOptions.java | 4 +- .../registry/model/GraniteGuardian41.java | 228 ++++++++++ .../model/GraniteGuardian41Categories.java | 419 ++++++++++++++++++ .../model/GraniteGuardianFilterConfig.java | 331 ++++++++++++++ .../GroundingFilterSearchConfiguration.java | 4 +- .../registry/model/GroundingModuleConfig.java | 4 +- .../model/GroundingModuleConfigConfig.java | 4 +- ...oundingModuleConfigConfigFiltersInner.java | 4 +- ...oundingModuleConfigConfigPlaceholders.java | 4 +- .../prompt/registry/model/ImageContent.java | 4 +- .../registry/model/ImageContentImageUrl.java | 4 +- .../registry/model/ImageContentUrl.java | 4 +- .../registry/model/InputFilterConfig.java | 5 +- .../model/InputFilterTargetSelector.java | 26 ++ .../registry/model/InputFilteringConfig.java | 4 +- .../registry/model/KeyValueListPair.java | 4 +- .../registry/model/LLMModelDetails.java | 65 ++- .../model/LastMessagesTargetSelector.java | 199 +++++++++ .../prompt/registry/model/LlamaGuard38b.java | 4 +- .../model/LlamaGuard38bFilterConfig.java | 47 +- .../registry/model/MaskingModuleConfig.java | 4 +- .../MaskingModuleConfigMaskingProviders.java | 4 +- .../model/MaskingModuleConfigProviders.java | 4 +- .../registry/model/MessageToolCall.java | 4 +- .../model/MessageToolCallFunction.java | 4 +- .../prompt/registry/model/ModuleConfigs.java | 4 +- .../registry/model/MultiChatContent.java | 4 +- .../registry/model/MultiChatTemplate.java | 4 +- .../OrchestrationConfigDeleteResponse.java | 4 +- .../model/OrchestrationConfigGetResponse.java | 4 +- ...hestrationConfigHistoryDeleteResponse.java | 4 +- .../OrchestrationConfigListResponse.java | 4 +- .../model/OrchestrationConfigPostRequest.java | 4 +- .../OrchestrationConfigPostResponse.java | 4 +- .../model/OrchestrationConfigResource.java | 4 +- ...estrationConfigScenarioDeleteResponse.java | 4 +- .../registry/model/OutputFilterConfig.java | 5 +- .../registry/model/OutputFilteringConfig.java | 4 +- .../registry/model/PartialModuleConfigs.java | 4 +- .../PartialPromptTemplatingModuleConfig.java | 4 +- ...ialPromptTemplatingModuleConfigPrompt.java | 4 +- .../PromptRegistryOrchestrationConfig.java | 4 +- ...mptRegistryOrchestrationConfigModules.java | 4 +- .../prompt/registry/model/PromptTemplate.java | 4 +- .../model/PromptTemplateDeleteResponse.java | 4 +- .../model/PromptTemplateGetResponse.java | 4 +- .../PromptTemplateHistoryDeleteResponse.java | 4 +- .../model/PromptTemplateListResponse.java | 4 +- .../model/PromptTemplatePostRequest.java | 4 +- .../model/PromptTemplatePostResponse.java | 4 +- .../PromptTemplateScenarioDeleteResponse.java | 4 +- .../registry/model/PromptTemplateSpec.java | 4 +- .../PromptTemplateSpecResponseFormat.java | 4 +- .../PromptTemplateSubstitutionRequest.java | 4 +- .../PromptTemplateSubstitutionResponse.java | 4 +- .../model/PromptTemplatingModuleConfig.java | 4 +- .../prompt/registry/model/ReasoningBlock.java | 4 +- .../model/ResponseFormatJsonObject.java | 4 +- .../model/ResponseFormatJsonSchema.java | 4 +- .../ResponseFormatJsonSchemaJsonSchema.java | 4 +- .../registry/model/ResponseFormatText.java | 4 +- .../model/RuntimeOrchestrationConfigFile.java | 4 +- .../model/RuntimePromptTemplateFile.java | 4 +- .../RuntimePromptTemplateFileMetadata.java | 4 +- ...SAPDocumentTranslationApplyToSelector.java | 4 +- .../model/SAPDocumentTranslationInput.java | 4 +- .../SAPDocumentTranslationInputConfig.java | 4 +- .../model/SAPDocumentTranslationOutput.java | 4 +- .../SAPDocumentTranslationOutputConfig.java | 4 +- ...cumentTranslationOutputTargetLanguage.java | 4 +- .../model/SchemasChatCompletionTool.java | 4 +- .../registry/model/SchemasTextContent.java | 4 +- .../model/SearchDocumentKeyValueListPair.java | 4 +- .../model/SearchSelectOptionEnum.java | 4 +- .../registry/model/SingleChatTemplate.java | 4 +- .../registry/model/SystemChatMessage.java | 4 +- .../sdk/prompt/registry/model/Template.java | 4 +- .../prompt/registry/model/TemplateRef.java | 4 +- .../registry/model/TemplateRefByID.java | 4 +- .../TemplateRefByScenarioNameVersion.java | 4 +- .../model/TemplateRefTemplateRef.java | 4 +- .../model/TemplateResponseFormat.java | 4 +- .../prompt/registry/model/TextContent.java | 4 +- .../registry/model/ToolChatMessage.java | 4 +- .../model/TranslationModuleConfig.java | 4 +- .../registry/model/UserChatMessage.java | 4 +- .../model/UserChatMessageContent.java | 4 +- .../model/UserChatMessageContentItem.java | 4 +- .../main/resources/spec/prompt-registry.yaml | 284 ++++++++++-- 119 files changed, 2282 insertions(+), 393 deletions(-) create mode 100644 core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AfterLastRoleTargetSelector.java create mode 100644 core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardian41.java create mode 100644 core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardian41Categories.java create mode 100644 core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardianFilterConfig.java create mode 100644 core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilterTargetSelector.java create mode 100644 core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LastMessagesTargetSelector.java diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/OrchestrationConfigsApi.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/OrchestrationConfigsApi.java index ff0d44170..e4cbc90bc 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/OrchestrationConfigsApi.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/OrchestrationConfigsApi.java @@ -24,14 +24,19 @@ import javax.annotation.Nullable; /** - * Prompt Registry API in version 0.0.1. + * Prompt Registry in version 0.14.4. * - *

Prompt Storage service for Design time & Runtime prompt templates. + *

The Prompt Registry simplifies the lifecycle management of prompt templates across design and + * runtime environments. It comes with an imperative and declarative interface. This API + * specification describes the imperative API for managing prompt templates and also allows the + * retrieval of declarative managed prompt templates. A prompt template consists of chat messages + * where placeholders can be defined together with default values. Additional information such as + * metadata tags can be added to the resource as well. */ public class OrchestrationConfigsApi extends BaseApi { /** - * Instantiates this API class to invoke operations on the Prompt Registry API. + * Instantiates this API class to invoke operations on the Prompt Registry. * * @param httpDestination The destination that API should be used with */ @@ -40,8 +45,8 @@ public OrchestrationConfigsApi(@Nonnull final Destination httpDestination) { } /** - * Instantiates this API class to invoke operations on the Prompt Registry API based on a given - * {@link ApiClient}. + * Instantiates this API class to invoke operations on the Prompt Registry based on a given {@link + * ApiClient}. * * @param apiClient ApiClient to invoke the API on */ @@ -64,7 +69,9 @@ public OrchestrationConfigsApi withDefaultHeaders( } /** - * Create or update an orchestration config + * Orchestration config create + * + *

Create or update an imperatively managed orchestration config * *

200 - Successful response * @@ -128,7 +135,9 @@ public OrchestrationConfigPostResponse createUpdateOrchestrationConfig( } /** - * Create or update an orchestration config + * Orchestration config create + * + *

Create or update an imperatively managed orchestration config * *

200 - Successful response * @@ -151,7 +160,9 @@ public OrchestrationConfigPostResponse createUpdateOrchestrationConfig( } /** - * Delete orchestration config + * Orchestration config delete + * + *

Delete an imperatively managed orchestration config * *

200 - Successful response * @@ -161,7 +172,7 @@ public OrchestrationConfigPostResponse createUpdateOrchestrationConfig( * *

0 - Common Error * - * @param orchestrationConfigId (required) The value for the parameter orchestrationConfigId + * @param orchestrationConfigId (required) UUID of the resource. * @param aiResourceGroup (optional) Specify a resource group id to use * @return OrchestrationConfigDeleteResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API @@ -218,7 +229,9 @@ public OrchestrationConfigDeleteResponse deleteOrchestrationConfig( } /** - * Delete orchestration config + * Orchestration config delete + * + *

Delete an imperatively managed orchestration config * *

200 - Successful response * @@ -228,7 +241,7 @@ public OrchestrationConfigDeleteResponse deleteOrchestrationConfig( * *

0 - Common Error * - * @param orchestrationConfigId The value for the parameter orchestrationConfigId + * @param orchestrationConfigId UUID of the resource. * @return OrchestrationConfigDeleteResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -239,7 +252,9 @@ public OrchestrationConfigDeleteResponse deleteOrchestrationConfig( } /** - * Delete all non-current versions (history) for the given orchestration config + * Orchestration config history delete + * + *

Delete the version history of an imperatively managed orchestration config * *

200 - Successful response * @@ -249,9 +264,9 @@ public OrchestrationConfigDeleteResponse deleteOrchestrationConfig( * *

0 - Common Error * - * @param scenario (required) The value for the parameter scenario - * @param version (required) The value for the parameter version - * @param name (required) The value for the parameter name + * @param scenario (required) Scenario field of the resource. + * @param version (required) Version field of the resource. + * @param name (required) Name field of the resource. * @param aiResourceGroup (optional) Specify a resource group id to use * @return OrchestrationConfigHistoryDeleteResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API @@ -330,7 +345,9 @@ public OrchestrationConfigHistoryDeleteResponse deleteOrchestrationConfigHistory } /** - * Delete all non-current versions (history) for the given orchestration config + * Orchestration config history delete + * + *

Delete the version history of an imperatively managed orchestration config * *

200 - Successful response * @@ -340,9 +357,9 @@ public OrchestrationConfigHistoryDeleteResponse deleteOrchestrationConfigHistory * *

0 - Common Error * - * @param scenario The value for the parameter scenario - * @param version The value for the parameter version - * @param name The value for the parameter name + * @param scenario Scenario field of the resource. + * @param version Version field of the resource. + * @param name Name field of the resource. * @return OrchestrationConfigHistoryDeleteResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -354,7 +371,9 @@ public OrchestrationConfigHistoryDeleteResponse deleteOrchestrationConfigHistory } /** - * Delete all imperative orchestration configs in the given scenario. + * Orchestration config scenario delete + * + *

Delete all imperatively managed orchestration configs in a scenario * *

200 - Successful response * @@ -364,7 +383,7 @@ public OrchestrationConfigHistoryDeleteResponse deleteOrchestrationConfigHistory * *

0 - Common Error * - * @param scenario (required) The value for the parameter scenario + * @param scenario (required) Scenario field of the resource. * @param aiResourceGroup (optional) Specify a resource group id to use * @return OrchestrationConfigScenarioDeleteResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API @@ -421,7 +440,9 @@ public OrchestrationConfigScenarioDeleteResponse deleteOrchestrationConfigsBySce } /** - * Delete all imperative orchestration configs in the given scenario. + * Orchestration config scenario delete + * + *

Delete all imperatively managed orchestration configs in a scenario * *

200 - Successful response * @@ -431,7 +452,7 @@ public OrchestrationConfigScenarioDeleteResponse deleteOrchestrationConfigsBySce * *

0 - Common Error * - * @param scenario The value for the parameter scenario + * @param scenario Scenario field of the resource. * @return OrchestrationConfigScenarioDeleteResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -442,7 +463,9 @@ public OrchestrationConfigScenarioDeleteResponse deleteOrchestrationConfigsBySce } /** - * Export orchestration config + * Orchestration config export + * + *

Download an orchestration config as a file * *

200 - Successful response * @@ -450,7 +473,7 @@ public OrchestrationConfigScenarioDeleteResponse deleteOrchestrationConfigsBySce * *

0 - Common Error * - * @param orchestrationConfigId (required) The value for the parameter orchestrationConfigId + * @param orchestrationConfigId (required) UUID of the resource. * @param aiResourceGroup (optional) Specify a resource group id to use * @return byte[] * @throws OpenApiRequestException if an error occurs while attempting to invoke the API @@ -506,7 +529,9 @@ public byte[] exportOrchestrationConfig( } /** - * Export orchestration config + * Orchestration config export + * + *

Download an orchestration config as a file * *

200 - Successful response * @@ -514,7 +539,7 @@ public byte[] exportOrchestrationConfig( * *

0 - Common Error * - * @param orchestrationConfigId The value for the parameter orchestrationConfigId + * @param orchestrationConfigId UUID of the resource. * @return byte[] * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -525,7 +550,9 @@ public byte[] exportOrchestrationConfig(@Nonnull final UUID orchestrationConfigI } /** - * Get orchestration config by UUID + * Orchestration config get + * + *

Retrieve a orchestration config by its UUID * *

200 - Successful response * @@ -535,11 +562,11 @@ public byte[] exportOrchestrationConfig(@Nonnull final UUID orchestrationConfigI * *

0 - Common Error * - * @param orchestrationConfigId (required) The value for the parameter orchestrationConfigId + * @param orchestrationConfigId (required) UUID of the resource. * @param aiResourceGroup (optional) Specify a resource group id to use * @param resolveTemplateRef (optional, default to false) DEPRECATED: Use resolveTemplateRef - * instead - * @param resolveTemplateRef2 (optional) The value for the parameter resolveTemplateRef2 + * instead. + * @param resolveTemplateRef2 (optional) Whether a template reference should be resolved * @return OrchestrationConfigGetResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -602,7 +629,9 @@ public OrchestrationConfigGetResponse getOrchestrationConfigByUuid( } /** - * Get orchestration config by UUID + * Orchestration config get + * + *

Retrieve a orchestration config by its UUID * *

200 - Successful response * @@ -612,7 +641,7 @@ public OrchestrationConfigGetResponse getOrchestrationConfigByUuid( * *

0 - Common Error * - * @param orchestrationConfigId The value for the parameter orchestrationConfigId + * @param orchestrationConfigId UUID of the resource. * @return OrchestrationConfigGetResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -623,7 +652,9 @@ public OrchestrationConfigGetResponse getOrchestrationConfigByUuid( } /** - * Import orchestration config + * Orchestration config create + * + *

Create an imperatively managed orchestration config from a file * *

200 - Successful response * @@ -677,7 +708,9 @@ public OrchestrationConfigPostResponse importOrchestrationConfig( } /** - * Import orchestration config + * Orchestration config create + * + *

Create an imperatively managed orchestration config from a file * *

200 - Successful response * @@ -695,7 +728,9 @@ public OrchestrationConfigPostResponse importOrchestrationConfig() } /** - * List orchestration config history + * Orchestration config history + * + *

Obtain the history of edits of a particular imperatively managed orchestration config * *

200 - Successful response * @@ -708,15 +743,15 @@ public OrchestrationConfigPostResponse importOrchestrationConfig() * *

0 - Common Error * - * @param scenario (required) The value for the parameter scenario - * @param version (required) The value for the parameter version - * @param name (required) The value for the parameter name + * @param scenario (required) Scenario field of the resource. + * @param version (required) Version field of the resource. + * @param name (required) Name field of the resource. * @param aiResourceGroup (optional) Specify a resource group id to use - * @param includeSpec (optional, default to false) DEPRECATED: Use includeSpec instead - * @param includeSpec2 (optional) The value for the parameter includeSpec2 + * @param includeSpec (optional, default to false) DEPRECATED: Use includeSpec instead. + * @param includeSpec2 (optional) Whether include the spec section or not. * @param resolveTemplateRef (optional, default to false) DEPRECATED: Use resolveTemplateRef - * instead - * @param resolveTemplateRef2 (optional) The value for the parameter resolveTemplateRef2 + * instead. + * @param resolveTemplateRef2 (optional) Whether a template reference should be resolved * @param $top (optional) Number of results to return (1–500). When omitted the full result set is * returned (up to the server limit). * @param $skip (optional, default to 0) Number of results to skip before returning the page. @@ -811,7 +846,9 @@ public OrchestrationConfigListResponse listOrchestrationConfigHistory( } /** - * List orchestration config history + * Orchestration config history + * + *

Obtain the history of edits of a particular imperatively managed orchestration config * *

200 - Successful response * @@ -824,9 +861,9 @@ public OrchestrationConfigListResponse listOrchestrationConfigHistory( * *

0 - Common Error * - * @param scenario The value for the parameter scenario - * @param version The value for the parameter version - * @param name The value for the parameter name + * @param scenario Scenario field of the resource. + * @param version Version field of the resource. + * @param name Name field of the resource. * @return OrchestrationConfigListResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -839,7 +876,9 @@ public OrchestrationConfigListResponse listOrchestrationConfigHistory( } /** - * List orchestration configs + * Orchestration config list + * + *

List imperatively and declaratively managed orchestration config * *

200 - Successful response * @@ -853,15 +892,16 @@ public OrchestrationConfigListResponse listOrchestrationConfigHistory( *

0 - Common Error * * @param aiResourceGroup (optional) Specify a resource group id to use - * @param scenario (optional) The value for the parameter scenario - * @param name (optional) The value for the parameter name - * @param version (optional) The value for the parameter version - * @param retrieve (optional, default to both) The value for the parameter retrieve - * @param includeSpec (optional, default to false) DEPRECATED: Use includeSpec instead - * @param includeSpec2 (optional) The value for the parameter includeSpec2 + * @param scenario (optional) Scenario field of the resource. + * @param name (optional) Name field of the resource. + * @param version (optional) Version field of the resource. + * @param retrieve (optional, default to both) Whether to retrieve 'imperative', + * 'declarative', or 'both'. + * @param includeSpec (optional, default to false) DEPRECATED: Use includeSpec instead. + * @param includeSpec2 (optional) Whether the spec should be included in the response. * @param resolveTemplateRef (optional, default to false) DEPRECATED: Use resolveTemplateRef - * instead - * @param resolveTemplateRef2 (optional) The value for the parameter resolveTemplateRef2 + * instead. + * @param resolveTemplateRef2 (optional) Whether a template reference should be resolved * @param $top (optional) Number of results to return (1–500). When omitted the full result set is * returned (up to the server limit). * @param $skip (optional, default to 0) Number of results to skip before returning the page. @@ -931,7 +971,9 @@ public OrchestrationConfigListResponse listOrchestrationConfigs( } /** - * List orchestration configs + * Orchestration config list + * + *

List imperatively and declaratively managed orchestration config * *

200 - Successful response * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/PromptTemplatesApi.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/PromptTemplatesApi.java index f2f44b005..490af603c 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/PromptTemplatesApi.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/client/PromptTemplatesApi.java @@ -26,14 +26,19 @@ import javax.annotation.Nullable; /** - * Prompt Registry API in version 0.0.1. + * Prompt Registry in version 0.14.4. * - *

Prompt Storage service for Design time & Runtime prompt templates. + *

The Prompt Registry simplifies the lifecycle management of prompt templates across design and + * runtime environments. It comes with an imperative and declarative interface. This API + * specification describes the imperative API for managing prompt templates and also allows the + * retrieval of declarative managed prompt templates. A prompt template consists of chat messages + * where placeholders can be defined together with default values. Additional information such as + * metadata tags can be added to the resource as well. */ public class PromptTemplatesApi extends BaseApi { /** - * Instantiates this API class to invoke operations on the Prompt Registry API. + * Instantiates this API class to invoke operations on the Prompt Registry. * * @param httpDestination The destination that API should be used with */ @@ -42,8 +47,8 @@ public PromptTemplatesApi(@Nonnull final Destination httpDestination) { } /** - * Instantiates this API class to invoke operations on the Prompt Registry API based on a given - * {@link ApiClient}. + * Instantiates this API class to invoke operations on the Prompt Registry based on a given {@link + * ApiClient}. * * @param apiClient ApiClient to invoke the API on */ @@ -65,7 +70,9 @@ public PromptTemplatesApi withDefaultHeaders(@Nonnull final Map } /** - * Create or update a prompt template + * Prompt template create + * + *

Create or update a prompt template * *

200 - Successful response * @@ -134,7 +141,9 @@ public PromptTemplatePostResponse createUpdatePromptTemplate( } /** - * Create or update a prompt template + * Prompt template create + * + *

Create or update a prompt template * *

200 - Successful response * @@ -156,7 +165,9 @@ public PromptTemplatePostResponse createUpdatePromptTemplate( } /** - * Delete prompt template + * Prompt template delete + * + *

Delete an imperatively managed prompt template * *

200 - Successful response * @@ -166,7 +177,7 @@ public PromptTemplatePostResponse createUpdatePromptTemplate( * *

0 - Common Error * - * @param promptTemplateId (required) The value for the parameter promptTemplateId + * @param promptTemplateId (required) UUID of the prompt template. * @param aiResourceGroup (optional) Specify a resource group id to use * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used * @return PromptTemplateDeleteResponse @@ -229,7 +240,9 @@ public PromptTemplateDeleteResponse deletePromptTemplate( } /** - * Delete prompt template + * Prompt template delete + * + *

Delete an imperatively managed prompt template * *

200 - Successful response * @@ -239,7 +252,7 @@ public PromptTemplateDeleteResponse deletePromptTemplate( * *

0 - Common Error * - * @param promptTemplateId The value for the parameter promptTemplateId + * @param promptTemplateId UUID of the prompt template. * @return PromptTemplateDeleteResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -250,7 +263,9 @@ public PromptTemplateDeleteResponse deletePromptTemplate(@Nonnull final UUID pro } /** - * Delete all non-current versions (history) for the given prompt template + * Prompt template history delete + * + *

Delete the version history of an imperatively managed prompt template * *

200 - Successful response * @@ -260,9 +275,9 @@ public PromptTemplateDeleteResponse deletePromptTemplate(@Nonnull final UUID pro * *

0 - Common Error * - * @param scenario (required) The value for the parameter scenario - * @param version (required) The value for the parameter version - * @param name (required) The value for the parameter name + * @param scenario (required) Scenario field of the resource. + * @param version (required) Version field of the resource. + * @param name (required) Name field of the resource. * @param aiResourceGroup (optional) Specify a resource group id to use * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used * @return PromptTemplateHistoryDeleteResponse @@ -346,7 +361,9 @@ public PromptTemplateHistoryDeleteResponse deletePromptTemplateHistory( } /** - * Delete all non-current versions (history) for the given prompt template + * Prompt template history delete + * + *

Delete the version history of an imperatively managed prompt template * *

200 - Successful response * @@ -356,9 +373,9 @@ public PromptTemplateHistoryDeleteResponse deletePromptTemplateHistory( * *

0 - Common Error * - * @param scenario The value for the parameter scenario - * @param version The value for the parameter version - * @param name The value for the parameter name + * @param scenario Scenario field of the resource. + * @param version Version field of the resource. + * @param name Name field of the resource. * @return PromptTemplateHistoryDeleteResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -370,7 +387,9 @@ public PromptTemplateHistoryDeleteResponse deletePromptTemplateHistory( } /** - * Delete all imperative prompt templates in the given scenario. + * Prompt template scenario delete + * + *

Delete all imperatively managed prompt templates in a scenario * *

200 - Successful response * @@ -380,7 +399,7 @@ public PromptTemplateHistoryDeleteResponse deletePromptTemplateHistory( * *

0 - Common Error * - * @param scenario (required) The value for the parameter scenario + * @param scenario (required) Scenario field of the resource. * @param aiResourceGroup (optional) Specify a resource group id to use * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used * @return PromptTemplateScenarioDeleteResponse @@ -443,7 +462,9 @@ public PromptTemplateScenarioDeleteResponse deletePromptTemplatesByScenario( } /** - * Delete all imperative prompt templates in the given scenario. + * Prompt template scenario delete + * + *

Delete all imperatively managed prompt templates in a scenario * *

200 - Successful response * @@ -453,7 +474,7 @@ public PromptTemplateScenarioDeleteResponse deletePromptTemplatesByScenario( * *

0 - Common Error * - * @param scenario The value for the parameter scenario + * @param scenario Scenario field of the resource. * @return PromptTemplateScenarioDeleteResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -464,7 +485,9 @@ public PromptTemplateScenarioDeleteResponse deletePromptTemplatesByScenario( } /** - * Export prompt template + * Prompt template export + * + *

Download a prompt template as a file * *

200 - Successful response * @@ -472,7 +495,7 @@ public PromptTemplateScenarioDeleteResponse deletePromptTemplatesByScenario( * *

0 - Common Error * - * @param promptTemplateId (required) The value for the parameter promptTemplateId + * @param promptTemplateId (required) UUID of the prompt template. * @param aiResourceGroup (optional) Specify a resource group id to use * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used * @return byte[] @@ -534,7 +557,9 @@ public byte[] exportPromptTemplate( } /** - * Export prompt template + * Prompt template export + * + *

Download a prompt template as a file * *

200 - Successful response * @@ -542,7 +567,7 @@ public byte[] exportPromptTemplate( * *

0 - Common Error * - * @param promptTemplateId The value for the parameter promptTemplateId + * @param promptTemplateId UUID of the prompt template. * @return byte[] * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -553,7 +578,9 @@ public byte[] exportPromptTemplate(@Nonnull final UUID promptTemplateId) } /** - * Get prompt template by UUID + * Prompt template get + * + *

Get prompt template by UUID * *

200 - Successful response * @@ -563,7 +590,7 @@ public byte[] exportPromptTemplate(@Nonnull final UUID promptTemplateId) * *

0 - Common Error * - * @param promptTemplateId (required) The value for the parameter promptTemplateId + * @param promptTemplateId (required) UUID of the prompt template. * @param aiResourceGroup (optional) Specify a resource group id to use * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used * @return PromptTemplateGetResponse @@ -626,7 +653,9 @@ public PromptTemplateGetResponse getPromptTemplateByUuid( } /** - * Get prompt template by UUID + * Prompt template get + * + *

Get prompt template by UUID * *

200 - Successful response * @@ -636,7 +665,7 @@ public PromptTemplateGetResponse getPromptTemplateByUuid( * *

0 - Common Error * - * @param promptTemplateId The value for the parameter promptTemplateId + * @param promptTemplateId UUID of the prompt template. * @return PromptTemplateGetResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -647,7 +676,9 @@ public PromptTemplateGetResponse getPromptTemplateByUuid(@Nonnull final UUID pro } /** - * Import prompt template + * Prompt template create + * + *

Create an imperatively managed prompt template from a file * *

200 - Successful response * @@ -707,7 +738,9 @@ public PromptTemplatePostResponse importPromptTemplate( } /** - * Import prompt template + * Prompt template create + * + *

Create an imperatively managed prompt template from a file * *

200 - Successful response * @@ -724,7 +757,9 @@ public PromptTemplatePostResponse importPromptTemplate() throws OpenApiRequestEx } /** - * List prompt template history + * Prompt template history + * + *

List prompt template history * *

200 - Successful response * @@ -737,9 +772,9 @@ public PromptTemplatePostResponse importPromptTemplate() throws OpenApiRequestEx * *

0 - Common Error * - * @param scenario (required) The value for the parameter scenario - * @param version (required) The value for the parameter version - * @param name (required) The value for the parameter name + * @param scenario (required) Scenario field of the resource. + * @param version (required) Version field of the resource. + * @param name (required) Name field of the resource. * @param aiResourceGroup (optional) Specify a resource group id to use * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used * @param $top (optional) Number of results to return (1–500). When omitted the full result set is @@ -830,7 +865,9 @@ public PromptTemplateListResponse listPromptTemplateHistory( } /** - * List prompt template history + * Prompt template history + * + *

List prompt template history * *

200 - Successful response * @@ -843,9 +880,9 @@ public PromptTemplateListResponse listPromptTemplateHistory( * *

0 - Common Error * - * @param scenario The value for the parameter scenario - * @param version The value for the parameter version - * @param name The value for the parameter name + * @param scenario Scenario field of the resource. + * @param version Version field of the resource. + * @param name Name field of the resource. * @return PromptTemplateListResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -857,7 +894,9 @@ public PromptTemplateListResponse listPromptTemplateHistory( } /** - * List prompt templates + * Prompt template list + * + *

List prompt templates * *

200 - Successful response * @@ -872,11 +911,12 @@ public PromptTemplateListResponse listPromptTemplateHistory( * * @param aiResourceGroup (optional) Specify a resource group id to use * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used - * @param scenario (optional) The value for the parameter scenario - * @param name (optional) The value for the parameter name - * @param version (optional) The value for the parameter version - * @param retrieve (optional, default to both) The value for the parameter retrieve - * @param includeSpec (optional, default to false) The value for the parameter includeSpec + * @param scenario (optional) Scenario field of the resource. + * @param name (optional) Name field of the resource. + * @param version (optional) Version field of the resource. + * @param retrieve (optional, default to both) Whether to retrieve 'imperative', + * 'declarative', or 'both'. + * @param includeSpec (optional, default to false) Whether include the spec section or not. * @param $top (optional) Number of results to return (1–500). When omitted the full result set is * returned (up to the server limit). * @param $skip (optional, default to 0) Number of results to skip before returning the page. @@ -942,7 +982,9 @@ public PromptTemplateListResponse listPromptTemplates( } /** - * List prompt templates + * Prompt template list + * + *

List prompt templates * *

200 - Successful response * @@ -964,7 +1006,9 @@ public PromptTemplateListResponse listPromptTemplates() throws OpenApiRequestExc } /** - * Parse prompt template by ID + * Prompt template fill + * + *

Fill the placeholders of a prompt template that is identified by its UUID * *

200 - Successful response * @@ -974,10 +1018,10 @@ public PromptTemplateListResponse listPromptTemplates() throws OpenApiRequestExc * *

0 - Common Error * - * @param promptTemplateId (required) The value for the parameter promptTemplateId + * @param promptTemplateId (required) UUID of the prompt template. * @param aiResourceGroup (optional) Specify a resource group id to use * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used - * @param metadata (optional, default to false) The value for the parameter metadata + * @param metadata (optional, default to false) Whether to not include metadata in the response. * @param promptTemplateSubstitutionRequest (optional) The value for the parameter * promptTemplateSubstitutionRequest * @return PromptTemplateSubstitutionResponse @@ -1042,7 +1086,9 @@ public PromptTemplateSubstitutionResponse parsePromptTemplateById( } /** - * Parse prompt template by ID + * Prompt template fill + * + *

Fill the placeholders of a prompt template that is identified by its UUID * *

200 - Successful response * @@ -1052,7 +1098,7 @@ public PromptTemplateSubstitutionResponse parsePromptTemplateById( * *

0 - Common Error * - * @param promptTemplateId The value for the parameter promptTemplateId + * @param promptTemplateId UUID of the prompt template. * @return PromptTemplateSubstitutionResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -1063,7 +1109,10 @@ public PromptTemplateSubstitutionResponse parsePromptTemplateById( } /** - * Parse prompt template by name and version + * Prompt template fill + * + *

Fill the placeholders of a prompt template that is identified by its scenario, name and + * version * *

200 - Successful response * @@ -1073,12 +1122,12 @@ public PromptTemplateSubstitutionResponse parsePromptTemplateById( * *

0 - Common Error * - * @param scenario (required) The value for the parameter scenario - * @param version (required) The value for the parameter version - * @param name (required) The value for the parameter name + * @param scenario (required) Scenario field of the resource. + * @param version (required) Version field of the resource. + * @param name (required) Name field of the resource. * @param aiResourceGroup (optional) Specify a resource group id to use * @param aiResourceGroupScope (optional) Specify whether the resource group scope is to be used - * @param metadata (optional, default to false) The value for the parameter metadata + * @param metadata (optional, default to false) Whether to not include metadata in the response. * @param promptTemplateSubstitutionRequest (optional) The value for the parameter * promptTemplateSubstitutionRequest * @return PromptTemplateSubstitutionResponse @@ -1164,7 +1213,10 @@ public PromptTemplateSubstitutionResponse parsePromptTemplateByNameVersion( } /** - * Parse prompt template by name and version + * Prompt template fill + * + *

Fill the placeholders of a prompt template that is identified by its scenario, name and + * version * *

200 - Successful response * @@ -1174,9 +1226,9 @@ public PromptTemplateSubstitutionResponse parsePromptTemplateByNameVersion( * *

0 - Common Error * - * @param scenario The value for the parameter scenario - * @param version The value for the parameter version - * @param name The value for the parameter name + * @param scenario Scenario field of the resource. + * @param version Version field of the resource. + * @param name Name field of the resource. * @return PromptTemplateSubstitutionResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AfterLastRoleTargetSelector.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AfterLastRoleTargetSelector.java new file mode 100644 index 000000000..69be3fc81 --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AfterLastRoleTargetSelector.java @@ -0,0 +1,266 @@ +/* + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.ai.sdk.prompt.registry.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Set; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** AfterLastRoleTargetSelector */ +// CHECKSTYLE:OFF +public class AfterLastRoleTargetSelector implements InputFilterTargetSelector +// CHECKSTYLE:ON +{ + /** + * Filter all messages after the last message with this role in the combined message list. If no + * message is scoped after applying this filter, then the filter is skipped. + */ + public enum AfterLastRoleEnum { + /** The SYSTEM option of this AfterLastRoleTargetSelector */ + SYSTEM("system"), + + /** The USER option of this AfterLastRoleTargetSelector */ + USER("user"), + + /** The ASSISTANT option of this AfterLastRoleTargetSelector */ + ASSISTANT("assistant"), + + /** The DEVELOPER option of this AfterLastRoleTargetSelector */ + DEVELOPER("developer"), + + /** The TOOL option of this AfterLastRoleTargetSelector */ + TOOL("tool"), + + /** The UNKNOWN_DEFAULT_OPEN_API option of this AfterLastRoleTargetSelector */ + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + AfterLastRoleEnum(String value) { + this.value = value; + } + + /** + * Get the value of the enum + * + * @return The enum value + */ + @JsonValue + @Nonnull + public String getValue() { + return value; + } + + /** + * Get the String value of the enum value. + * + * @return The enum value as String + */ + @Override + @Nonnull + public String toString() { + return String.valueOf(value); + } + + /** + * Get the enum value from a String value + * + * @param value The String value + * @return The enum value of type AfterLastRoleTargetSelector + */ + @JsonCreator + @Nonnull + public static AfterLastRoleEnum fromValue(@Nonnull final String value) { + for (AfterLastRoleEnum b : AfterLastRoleEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + } + + @JsonProperty("after_last_role") + private AfterLastRoleEnum afterLastRole; + + @JsonAnySetter @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** Default constructor for AfterLastRoleTargetSelector. */ + protected AfterLastRoleTargetSelector() {} + + /** + * Set the afterLastRole of this {@link AfterLastRoleTargetSelector} instance and return the same + * instance. + * + * @param afterLastRole Filter all messages after the last message with this role in the combined + * message list. If no message is scoped after applying this filter, then the filter is + * skipped. + * @return The same instance of this {@link AfterLastRoleTargetSelector} class + */ + @Nonnull + public AfterLastRoleTargetSelector afterLastRole(@Nonnull final AfterLastRoleEnum afterLastRole) { + this.afterLastRole = afterLastRole; + return this; + } + + /** + * Filter all messages after the last message with this role in the combined message list. If no + * message is scoped after applying this filter, then the filter is skipped. + * + * @return afterLastRole The afterLastRole of this {@link AfterLastRoleTargetSelector} instance. + */ + @Nonnull + public AfterLastRoleEnum getAfterLastRole() { + return afterLastRole; + } + + /** + * Set the afterLastRole of this {@link AfterLastRoleTargetSelector} instance. + * + * @param afterLastRole Filter all messages after the last message with this role in the combined + * message list. If no message is scoped after applying this filter, then the filter is + * skipped. + */ + public void setAfterLastRole(@Nonnull final AfterLastRoleEnum afterLastRole) { + this.afterLastRole = afterLastRole; + } + + /** + * Get the names of the unrecognizable properties of the {@link AfterLastRoleTargetSelector}. + * + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link AfterLastRoleTargetSelector} + * instance. + * + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { + if (!cloudSdkCustomFields.containsKey(name)) { + throw new NoSuchElementException( + "AfterLastRoleTargetSelector has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link AfterLastRoleTargetSelector} instance including + * unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if (afterLastRole != null) declaredFields.put("afterLastRole", afterLastRole); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link AfterLastRoleTargetSelector} instance. If the map + * previously contained a mapping for the key, the old value is replaced by the specified value. + * + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final AfterLastRoleTargetSelector afterLastRoleTargetSelector = (AfterLastRoleTargetSelector) o; + return Objects.equals( + this.cloudSdkCustomFields, afterLastRoleTargetSelector.cloudSdkCustomFields) + && Objects.equals(this.afterLastRole, afterLastRoleTargetSelector.afterLastRole); + } + + @Override + public int hashCode() { + return Objects.hash(afterLastRole, cloudSdkCustomFields); + } + + @Override + @Nonnull + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class AfterLastRoleTargetSelector {\n"); + sb.append(" afterLastRole: ").append(toIndentedString(afterLastRole)).append("\n"); + cloudSdkCustomFields.forEach( + (k, v) -> + sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create a type-safe, fluent-api builder object to construct a new {@link + * AfterLastRoleTargetSelector} instance with all required arguments. + */ + public static Builder create() { + return (afterLastRole) -> new AfterLastRoleTargetSelector().afterLastRole(afterLastRole); + } + + /** Builder helper class. */ + public interface Builder { + /** + * Set the afterLastRole of this {@link AfterLastRoleTargetSelector} instance. + * + * @param afterLastRole Filter all messages after the last message with this role in the + * combined message list. If no message is scoped after applying this filter, then the + * filter is skipped. + * @return The AfterLastRoleTargetSelector instance. + */ + AfterLastRoleTargetSelector afterLastRole(@Nonnull final AfterLastRoleEnum afterLastRole); + } +} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AssistantChatMessage.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AssistantChatMessage.java index cc7047da1..4d899c7e2 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AssistantChatMessage.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AssistantChatMessage.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyInput.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyInput.java index 535537df6..c399b187c 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyInput.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyInput.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyInputFilterConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyInputFilterConfig.java index 56ff702f6..255753a44 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyInputFilterConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyInputFilterConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * @@ -90,6 +90,9 @@ public static TypeEnum fromValue(@Nonnull final String value) { @JsonProperty("config") private AzureContentSafetyInput config; + @JsonProperty("target_selector") + private InputFilterTargetSelector targetSelector; + @JsonAnySetter @JsonAnyGetter private final Map cloudSdkCustomFields = new LinkedHashMap<>(); @@ -161,6 +164,40 @@ public void setConfig(@Nullable final AzureContentSafetyInput config) { this.config = config; } + /** + * Set the targetSelector of this {@link AzureContentSafetyInputFilterConfig} instance and return + * the same instance. + * + * @param targetSelector The targetSelector of this {@link AzureContentSafetyInputFilterConfig} + * @return The same instance of this {@link AzureContentSafetyInputFilterConfig} class + */ + @Nonnull + public AzureContentSafetyInputFilterConfig targetSelector( + @Nullable final InputFilterTargetSelector targetSelector) { + this.targetSelector = targetSelector; + return this; + } + + /** + * Get targetSelector + * + * @return targetSelector The targetSelector of this {@link AzureContentSafetyInputFilterConfig} + * instance. + */ + @Nonnull + public InputFilterTargetSelector getTargetSelector() { + return targetSelector; + } + + /** + * Set the targetSelector of this {@link AzureContentSafetyInputFilterConfig} instance. + * + * @param targetSelector The targetSelector of this {@link AzureContentSafetyInputFilterConfig} + */ + public void setTargetSelector(@Nullable final InputFilterTargetSelector targetSelector) { + this.targetSelector = targetSelector; + } + /** * Get the names of the unrecognizable properties of the {@link * AzureContentSafetyInputFilterConfig}. @@ -204,6 +241,7 @@ public Map toMap() { final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); if (type != null) declaredFields.put("type", type); if (config != null) declaredFields.put("config", config); + if (targetSelector != null) declaredFields.put("targetSelector", targetSelector); return declaredFields; } @@ -233,12 +271,13 @@ public boolean equals(@Nullable final java.lang.Object o) { return Objects.equals( this.cloudSdkCustomFields, azureContentSafetyInputFilterConfig.cloudSdkCustomFields) && Objects.equals(this.type, azureContentSafetyInputFilterConfig.type) - && Objects.equals(this.config, azureContentSafetyInputFilterConfig.config); + && Objects.equals(this.config, azureContentSafetyInputFilterConfig.config) + && Objects.equals(this.targetSelector, azureContentSafetyInputFilterConfig.targetSelector); } @Override public int hashCode() { - return Objects.hash(type, config, cloudSdkCustomFields); + return Objects.hash(type, config, targetSelector, cloudSdkCustomFields); } @Override @@ -248,6 +287,7 @@ public String toString() { sb.append("class AzureContentSafetyInputFilterConfig {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" targetSelector: ").append(toIndentedString(targetSelector)).append("\n"); cloudSdkCustomFields.forEach( (k, v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyOutput.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyOutput.java index 07b1ceb17..07403c6a6 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyOutput.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyOutput.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyOutputFilterConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyOutputFilterConfig.java index b33efe0ec..17f7bd25e 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyOutputFilterConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureContentSafetyOutputFilterConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureThreshold.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureThreshold.java index 9a6e5048a..194fb747b 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureThreshold.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/AzureThreshold.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/CacheControl.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/CacheControl.java index bba3c551d..6fe95e99c 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/CacheControl.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/CacheControl.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatCompletionTool.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatCompletionTool.java index 68c1cc6c1..f6d0195f6 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatCompletionTool.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatCompletionTool.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatMessage.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatMessage.java index a525a4bd0..74a62c941 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatMessage.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatMessage.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatMessageContent.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatMessageContent.java index a447eccf0..02b62e830 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatMessageContent.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ChatMessageContent.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIConfig.java index d0ac9d3a3..ff8d788b1 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIConfigMaskGroundingInput.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIConfigMaskGroundingInput.java index 17906fb12..93bb0aab4 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIConfigMaskGroundingInput.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIConfigMaskGroundingInput.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPICustomEntity.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPICustomEntity.java index 5c990fa07..ba830f7a4 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPICustomEntity.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPICustomEntity.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIEntities.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIEntities.java index 874bc8ed5..85b866586 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIEntities.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIEntities.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIEntityConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIEntityConfig.java index 9e6a99a72..9ce13552b 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIEntityConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIEntityConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIMethodConstant.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIMethodConstant.java index 6993443b6..76ff8cf3b 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIMethodConstant.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIMethodConstant.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIMethodFabricatedData.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIMethodFabricatedData.java index 86ab4b038..733af7d1c 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIMethodFabricatedData.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIMethodFabricatedData.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIStandardEntity.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIStandardEntity.java index a99bab563..28fdb10c3 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIStandardEntity.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIStandardEntity.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIStandardEntityReplacementStrategy.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIStandardEntityReplacementStrategy.java index 8f2dbc248..283533f99 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIStandardEntityReplacementStrategy.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DPIStandardEntityReplacementStrategy.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DataRepositoryType.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DataRepositoryType.java index 0948d9f3d..6456831cc 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DataRepositoryType.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DataRepositoryType.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DeveloperChatMessage.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DeveloperChatMessage.java index 94632396e..4922202e1 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DeveloperChatMessage.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DeveloperChatMessage.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DocumentGroundingFilter.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DocumentGroundingFilter.java index cef21fbcc..37fd17447 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DocumentGroundingFilter.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/DocumentGroundingFilter.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ErrorResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ErrorResponse.java index 25dc8f87d..c6fac82fb 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ErrorResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ErrorResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FileContent.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FileContent.java index bab9b78b2..8f5b86073 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FileContent.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FileContent.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FilteringModuleConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FilteringModuleConfig.java index 76082517c..3d1041720 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FilteringModuleConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FilteringModuleConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FilteringStreamOptions.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FilteringStreamOptions.java index a635ce815..98f70d9be 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FilteringStreamOptions.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FilteringStreamOptions.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FunctionObject.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FunctionObject.java index 9e129c4a3..ca7e85a80 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FunctionObject.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FunctionObject.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GlobalStreamOptions.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GlobalStreamOptions.java index a99db9805..2f2a0f4fb 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GlobalStreamOptions.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GlobalStreamOptions.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardian41.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardian41.java new file mode 100644 index 000000000..4bdfbb3c6 --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardian41.java @@ -0,0 +1,228 @@ +/* + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.ai.sdk.prompt.registry.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Set; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** Configuration for IBM Granite Guardian 4.1 filter provider. */ +// CHECKSTYLE:OFF +public class GraniteGuardian41 +// CHECKSTYLE:ON +{ + @JsonProperty("enable_reasoning") + private Boolean enableReasoning = false; + + @JsonProperty("categories") + private GraniteGuardian41Categories categories; + + @JsonAnySetter @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** Default constructor for GraniteGuardian41. */ + protected GraniteGuardian41() {} + + /** + * Set the enableReasoning of this {@link GraniteGuardian41} instance and return the same + * instance. + * + * @param enableReasoning Enable reasoning (think) mode for Granite Guardian. Applies to every + * configured category. Returns reasoning content when enabled, e.g. 'harm': + * {'verdict': true, 'reasoning': '...'} + * @return The same instance of this {@link GraniteGuardian41} class + */ + @Nonnull + public GraniteGuardian41 enableReasoning(@Nullable final Boolean enableReasoning) { + this.enableReasoning = enableReasoning; + return this; + } + + /** + * Enable reasoning (think) mode for Granite Guardian. Applies to every configured category. + * Returns reasoning content when enabled, e.g. 'harm': {'verdict': true, + * 'reasoning': '...'} + * + * @return enableReasoning The enableReasoning of this {@link GraniteGuardian41} instance. + */ + @Nonnull + public Boolean isEnableReasoning() { + return enableReasoning; + } + + /** + * Set the enableReasoning of this {@link GraniteGuardian41} instance. + * + * @param enableReasoning Enable reasoning (think) mode for Granite Guardian. Applies to every + * configured category. Returns reasoning content when enabled, e.g. 'harm': + * {'verdict': true, 'reasoning': '...'} + */ + public void setEnableReasoning(@Nullable final Boolean enableReasoning) { + this.enableReasoning = enableReasoning; + } + + /** + * Set the categories of this {@link GraniteGuardian41} instance and return the same instance. + * + * @param categories The categories of this {@link GraniteGuardian41} + * @return The same instance of this {@link GraniteGuardian41} class + */ + @Nonnull + public GraniteGuardian41 categories(@Nonnull final GraniteGuardian41Categories categories) { + this.categories = categories; + return this; + } + + /** + * Get categories + * + * @return categories The categories of this {@link GraniteGuardian41} instance. + */ + @Nonnull + public GraniteGuardian41Categories getCategories() { + return categories; + } + + /** + * Set the categories of this {@link GraniteGuardian41} instance. + * + * @param categories The categories of this {@link GraniteGuardian41} + */ + public void setCategories(@Nonnull final GraniteGuardian41Categories categories) { + this.categories = categories; + } + + /** + * Get the names of the unrecognizable properties of the {@link GraniteGuardian41}. + * + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link GraniteGuardian41} instance. + * + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { + if (!cloudSdkCustomFields.containsKey(name)) { + throw new NoSuchElementException("GraniteGuardian41 has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link GraniteGuardian41} instance including + * unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if (enableReasoning != null) declaredFields.put("enableReasoning", enableReasoning); + if (categories != null) declaredFields.put("categories", categories); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link GraniteGuardian41} instance. If the map + * previously contained a mapping for the key, the old value is replaced by the specified value. + * + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final GraniteGuardian41 graniteGuardian41 = (GraniteGuardian41) o; + return Objects.equals(this.cloudSdkCustomFields, graniteGuardian41.cloudSdkCustomFields) + && Objects.equals(this.enableReasoning, graniteGuardian41.enableReasoning) + && Objects.equals(this.categories, graniteGuardian41.categories); + } + + @Override + public int hashCode() { + return Objects.hash(enableReasoning, categories, cloudSdkCustomFields); + } + + @Override + @Nonnull + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class GraniteGuardian41 {\n"); + sb.append(" enableReasoning: ").append(toIndentedString(enableReasoning)).append("\n"); + sb.append(" categories: ").append(toIndentedString(categories)).append("\n"); + cloudSdkCustomFields.forEach( + (k, v) -> + sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create a type-safe, fluent-api builder object to construct a new {@link GraniteGuardian41} + * instance with all required arguments. + */ + public static Builder create() { + return (categories) -> new GraniteGuardian41().categories(categories); + } + + /** Builder helper class. */ + public interface Builder { + /** + * Set the categories of this {@link GraniteGuardian41} instance. + * + * @param categories The categories of this {@link GraniteGuardian41} + * @return The GraniteGuardian41 instance. + */ + GraniteGuardian41 categories(@Nonnull final GraniteGuardian41Categories categories); + } +} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardian41Categories.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardian41Categories.java new file mode 100644 index 000000000..468ac10af --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardian41Categories.java @@ -0,0 +1,419 @@ +/* + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.ai.sdk.prompt.registry.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Set; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** + * Content criteria to evaluate. Note: Granite Guardian requires separate calls for each configured + * content category. Recommendation: Use only `harm` catch all content category. + */ +// CHECKSTYLE:OFF +public class GraniteGuardian41Categories +// CHECKSTYLE:ON +{ + @JsonProperty("harm") + private Boolean harm; + + @JsonProperty("social_bias") + private Boolean socialBias; + + @JsonProperty("jailbreak") + private Boolean jailbreak; + + @JsonProperty("violence") + private Boolean violence; + + @JsonProperty("profanity") + private Boolean profanity; + + @JsonProperty("sexual_content") + private Boolean sexualContent; + + @JsonProperty("unethical_behavior") + private Boolean unethicalBehavior; + + @JsonAnySetter @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** Default constructor for GraniteGuardian41Categories. */ + protected GraniteGuardian41Categories() {} + + /** + * Set the harm of this {@link GraniteGuardian41Categories} instance and return the same instance. + * + * @param harm Catch-all criterion for generally harmful content. + * @return The same instance of this {@link GraniteGuardian41Categories} class + */ + @Nonnull + public GraniteGuardian41Categories harm(@Nullable final Boolean harm) { + this.harm = harm; + return this; + } + + /** + * Catch-all criterion for generally harmful content. + * + * @return harm The harm of this {@link GraniteGuardian41Categories} instance. + */ + @Nonnull + public Boolean isHarm() { + return harm; + } + + /** + * Set the harm of this {@link GraniteGuardian41Categories} instance. + * + * @param harm Catch-all criterion for generally harmful content. + */ + public void setHarm(@Nullable final Boolean harm) { + this.harm = harm; + } + + /** + * Set the socialBias of this {@link GraniteGuardian41Categories} instance and return the same + * instance. + * + * @param socialBias Detect prejudice or discrimination based on identity or protected + * characteristics. + * @return The same instance of this {@link GraniteGuardian41Categories} class + */ + @Nonnull + public GraniteGuardian41Categories socialBias(@Nullable final Boolean socialBias) { + this.socialBias = socialBias; + return this; + } + + /** + * Detect prejudice or discrimination based on identity or protected characteristics. + * + * @return socialBias The socialBias of this {@link GraniteGuardian41Categories} instance. + */ + @Nonnull + public Boolean isSocialBias() { + return socialBias; + } + + /** + * Set the socialBias of this {@link GraniteGuardian41Categories} instance. + * + * @param socialBias Detect prejudice or discrimination based on identity or protected + * characteristics. + */ + public void setSocialBias(@Nullable final Boolean socialBias) { + this.socialBias = socialBias; + } + + /** + * Set the jailbreak of this {@link GraniteGuardian41Categories} instance and return the same + * instance. + * + * @param jailbreak Detect attempts to manipulate the model into producing harmful or otherwise + * undesired outputs. + * @return The same instance of this {@link GraniteGuardian41Categories} class + */ + @Nonnull + public GraniteGuardian41Categories jailbreak(@Nullable final Boolean jailbreak) { + this.jailbreak = jailbreak; + return this; + } + + /** + * Detect attempts to manipulate the model into producing harmful or otherwise undesired outputs. + * + * @return jailbreak The jailbreak of this {@link GraniteGuardian41Categories} instance. + */ + @Nonnull + public Boolean isJailbreak() { + return jailbreak; + } + + /** + * Set the jailbreak of this {@link GraniteGuardian41Categories} instance. + * + * @param jailbreak Detect attempts to manipulate the model into producing harmful or otherwise + * undesired outputs. + */ + public void setJailbreak(@Nullable final Boolean jailbreak) { + this.jailbreak = jailbreak; + } + + /** + * Set the violence of this {@link GraniteGuardian41Categories} instance and return the same + * instance. + * + * @param violence Detect content promoting or depicting physical, mental, or sexual harm. + * @return The same instance of this {@link GraniteGuardian41Categories} class + */ + @Nonnull + public GraniteGuardian41Categories violence(@Nullable final Boolean violence) { + this.violence = violence; + return this; + } + + /** + * Detect content promoting or depicting physical, mental, or sexual harm. + * + * @return violence The violence of this {@link GraniteGuardian41Categories} instance. + */ + @Nonnull + public Boolean isViolence() { + return violence; + } + + /** + * Set the violence of this {@link GraniteGuardian41Categories} instance. + * + * @param violence Detect content promoting or depicting physical, mental, or sexual harm. + */ + public void setViolence(@Nullable final Boolean violence) { + this.violence = violence; + } + + /** + * Set the profanity of this {@link GraniteGuardian41Categories} instance and return the same + * instance. + * + * @param profanity Detect offensive language or insults. + * @return The same instance of this {@link GraniteGuardian41Categories} class + */ + @Nonnull + public GraniteGuardian41Categories profanity(@Nullable final Boolean profanity) { + this.profanity = profanity; + return this; + } + + /** + * Detect offensive language or insults. + * + * @return profanity The profanity of this {@link GraniteGuardian41Categories} instance. + */ + @Nonnull + public Boolean isProfanity() { + return profanity; + } + + /** + * Set the profanity of this {@link GraniteGuardian41Categories} instance. + * + * @param profanity Detect offensive language or insults. + */ + public void setProfanity(@Nullable final Boolean profanity) { + this.profanity = profanity; + } + + /** + * Set the sexualContent of this {@link GraniteGuardian41Categories} instance and return the same + * instance. + * + * @param sexualContent Detect explicit or suggestive material of a sexual nature. + * @return The same instance of this {@link GraniteGuardian41Categories} class + */ + @Nonnull + public GraniteGuardian41Categories sexualContent(@Nullable final Boolean sexualContent) { + this.sexualContent = sexualContent; + return this; + } + + /** + * Detect explicit or suggestive material of a sexual nature. + * + * @return sexualContent The sexualContent of this {@link GraniteGuardian41Categories} instance. + */ + @Nonnull + public Boolean isSexualContent() { + return sexualContent; + } + + /** + * Set the sexualContent of this {@link GraniteGuardian41Categories} instance. + * + * @param sexualContent Detect explicit or suggestive material of a sexual nature. + */ + public void setSexualContent(@Nullable final Boolean sexualContent) { + this.sexualContent = sexualContent; + } + + /** + * Set the unethicalBehavior of this {@link GraniteGuardian41Categories} instance and return the + * same instance. + * + * @param unethicalBehavior Detect content describing actions that violate moral or legal + * standards. + * @return The same instance of this {@link GraniteGuardian41Categories} class + */ + @Nonnull + public GraniteGuardian41Categories unethicalBehavior(@Nullable final Boolean unethicalBehavior) { + this.unethicalBehavior = unethicalBehavior; + return this; + } + + /** + * Detect content describing actions that violate moral or legal standards. + * + * @return unethicalBehavior The unethicalBehavior of this {@link GraniteGuardian41Categories} + * instance. + */ + @Nonnull + public Boolean isUnethicalBehavior() { + return unethicalBehavior; + } + + /** + * Set the unethicalBehavior of this {@link GraniteGuardian41Categories} instance. + * + * @param unethicalBehavior Detect content describing actions that violate moral or legal + * standards. + */ + public void setUnethicalBehavior(@Nullable final Boolean unethicalBehavior) { + this.unethicalBehavior = unethicalBehavior; + } + + /** + * Get the names of the unrecognizable properties of the {@link GraniteGuardian41Categories}. + * + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link GraniteGuardian41Categories} + * instance. + * + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { + if (!cloudSdkCustomFields.containsKey(name)) { + throw new NoSuchElementException( + "GraniteGuardian41Categories has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link GraniteGuardian41Categories} instance including + * unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if (harm != null) declaredFields.put("harm", harm); + if (socialBias != null) declaredFields.put("socialBias", socialBias); + if (jailbreak != null) declaredFields.put("jailbreak", jailbreak); + if (violence != null) declaredFields.put("violence", violence); + if (profanity != null) declaredFields.put("profanity", profanity); + if (sexualContent != null) declaredFields.put("sexualContent", sexualContent); + if (unethicalBehavior != null) declaredFields.put("unethicalBehavior", unethicalBehavior); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link GraniteGuardian41Categories} instance. If the map + * previously contained a mapping for the key, the old value is replaced by the specified value. + * + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final GraniteGuardian41Categories graniteGuardian41Categories = (GraniteGuardian41Categories) o; + return Objects.equals( + this.cloudSdkCustomFields, graniteGuardian41Categories.cloudSdkCustomFields) + && Objects.equals(this.harm, graniteGuardian41Categories.harm) + && Objects.equals(this.socialBias, graniteGuardian41Categories.socialBias) + && Objects.equals(this.jailbreak, graniteGuardian41Categories.jailbreak) + && Objects.equals(this.violence, graniteGuardian41Categories.violence) + && Objects.equals(this.profanity, graniteGuardian41Categories.profanity) + && Objects.equals(this.sexualContent, graniteGuardian41Categories.sexualContent) + && Objects.equals(this.unethicalBehavior, graniteGuardian41Categories.unethicalBehavior); + } + + @Override + public int hashCode() { + return Objects.hash( + harm, + socialBias, + jailbreak, + violence, + profanity, + sexualContent, + unethicalBehavior, + cloudSdkCustomFields); + } + + @Override + @Nonnull + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class GraniteGuardian41Categories {\n"); + sb.append(" harm: ").append(toIndentedString(harm)).append("\n"); + sb.append(" socialBias: ").append(toIndentedString(socialBias)).append("\n"); + sb.append(" jailbreak: ").append(toIndentedString(jailbreak)).append("\n"); + sb.append(" violence: ").append(toIndentedString(violence)).append("\n"); + sb.append(" profanity: ").append(toIndentedString(profanity)).append("\n"); + sb.append(" sexualContent: ").append(toIndentedString(sexualContent)).append("\n"); + sb.append(" unethicalBehavior: ").append(toIndentedString(unethicalBehavior)).append("\n"); + cloudSdkCustomFields.forEach( + (k, v) -> + sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** Create a new {@link GraniteGuardian41Categories} instance. No arguments are required. */ + public static GraniteGuardian41Categories create() { + return new GraniteGuardian41Categories(); + } +} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardianFilterConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardianFilterConfig.java new file mode 100644 index 000000000..f5050a4d0 --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GraniteGuardianFilterConfig.java @@ -0,0 +1,331 @@ +/* + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.ai.sdk.prompt.registry.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Set; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** Filter configuration for IBM Granite Guardian filter provider. */ +// CHECKSTYLE:OFF +public class GraniteGuardianFilterConfig implements InputFilterConfig, OutputFilterConfig +// CHECKSTYLE:ON +{ + /** Name of the filter provider type */ + public enum TypeEnum { + /** The GRANITE_GUARDIAN_4_1 option of this GraniteGuardianFilterConfig */ + GRANITE_GUARDIAN_4_1("granite_guardian_4_1"), + + /** The UNKNOWN_DEFAULT_OPEN_API option of this GraniteGuardianFilterConfig */ + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + /** + * Get the value of the enum + * + * @return The enum value + */ + @JsonValue + @Nonnull + public String getValue() { + return value; + } + + /** + * Get the String value of the enum value. + * + * @return The enum value as String + */ + @Override + @Nonnull + public String toString() { + return String.valueOf(value); + } + + /** + * Get the enum value from a String value + * + * @param value The String value + * @return The enum value of type GraniteGuardianFilterConfig + */ + @JsonCreator + @Nonnull + public static TypeEnum fromValue(@Nonnull final String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + } + + @JsonProperty("type") + private TypeEnum type; + + @JsonProperty("config") + private GraniteGuardian41 config; + + @JsonProperty("target_selector") + private InputFilterTargetSelector targetSelector; + + @JsonAnySetter @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** Default constructor for GraniteGuardianFilterConfig. */ + protected GraniteGuardianFilterConfig() {} + + /** + * Set the type of this {@link GraniteGuardianFilterConfig} instance and return the same instance. + * + * @param type Name of the filter provider type + * @return The same instance of this {@link GraniteGuardianFilterConfig} class + */ + @Nonnull + public GraniteGuardianFilterConfig type(@Nonnull final TypeEnum type) { + this.type = type; + return this; + } + + /** + * Name of the filter provider type + * + * @return type The type of this {@link GraniteGuardianFilterConfig} instance. + */ + @Nonnull + public TypeEnum getType() { + return type; + } + + /** + * Set the type of this {@link GraniteGuardianFilterConfig} instance. + * + * @param type Name of the filter provider type + */ + public void setType(@Nonnull final TypeEnum type) { + this.type = type; + } + + /** + * Set the config of this {@link GraniteGuardianFilterConfig} instance and return the same + * instance. + * + * @param config The config of this {@link GraniteGuardianFilterConfig} + * @return The same instance of this {@link GraniteGuardianFilterConfig} class + */ + @Nonnull + public GraniteGuardianFilterConfig config(@Nonnull final GraniteGuardian41 config) { + this.config = config; + return this; + } + + /** + * Get config + * + * @return config The config of this {@link GraniteGuardianFilterConfig} instance. + */ + @Nonnull + public GraniteGuardian41 getConfig() { + return config; + } + + /** + * Set the config of this {@link GraniteGuardianFilterConfig} instance. + * + * @param config The config of this {@link GraniteGuardianFilterConfig} + */ + public void setConfig(@Nonnull final GraniteGuardian41 config) { + this.config = config; + } + + /** + * Set the targetSelector of this {@link GraniteGuardianFilterConfig} instance and return the same + * instance. + * + * @param targetSelector The targetSelector of this {@link GraniteGuardianFilterConfig} + * @return The same instance of this {@link GraniteGuardianFilterConfig} class + */ + @Nonnull + public GraniteGuardianFilterConfig targetSelector( + @Nullable final InputFilterTargetSelector targetSelector) { + this.targetSelector = targetSelector; + return this; + } + + /** + * Get targetSelector + * + * @return targetSelector The targetSelector of this {@link GraniteGuardianFilterConfig} instance. + */ + @Nonnull + public InputFilterTargetSelector getTargetSelector() { + return targetSelector; + } + + /** + * Set the targetSelector of this {@link GraniteGuardianFilterConfig} instance. + * + * @param targetSelector The targetSelector of this {@link GraniteGuardianFilterConfig} + */ + public void setTargetSelector(@Nullable final InputFilterTargetSelector targetSelector) { + this.targetSelector = targetSelector; + } + + /** + * Get the names of the unrecognizable properties of the {@link GraniteGuardianFilterConfig}. + * + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link GraniteGuardianFilterConfig} + * instance. + * + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { + if (!cloudSdkCustomFields.containsKey(name)) { + throw new NoSuchElementException( + "GraniteGuardianFilterConfig has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link GraniteGuardianFilterConfig} instance including + * unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if (type != null) declaredFields.put("type", type); + if (config != null) declaredFields.put("config", config); + if (targetSelector != null) declaredFields.put("targetSelector", targetSelector); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link GraniteGuardianFilterConfig} instance. If the map + * previously contained a mapping for the key, the old value is replaced by the specified value. + * + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final GraniteGuardianFilterConfig graniteGuardianFilterConfig = (GraniteGuardianFilterConfig) o; + return Objects.equals( + this.cloudSdkCustomFields, graniteGuardianFilterConfig.cloudSdkCustomFields) + && Objects.equals(this.type, graniteGuardianFilterConfig.type) + && Objects.equals(this.config, graniteGuardianFilterConfig.config) + && Objects.equals(this.targetSelector, graniteGuardianFilterConfig.targetSelector); + } + + @Override + public int hashCode() { + return Objects.hash(type, config, targetSelector, cloudSdkCustomFields); + } + + @Override + @Nonnull + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class GraniteGuardianFilterConfig {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" targetSelector: ").append(toIndentedString(targetSelector)).append("\n"); + cloudSdkCustomFields.forEach( + (k, v) -> + sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create a type-safe, fluent-api builder object to construct a new {@link + * GraniteGuardianFilterConfig} instance with all required arguments. + */ + public static Builder create() { + return (type) -> (config) -> new GraniteGuardianFilterConfig().type(type).config(config); + } + + /** Builder helper class. */ + public interface Builder { + /** + * Set the type of this {@link GraniteGuardianFilterConfig} instance. + * + * @param type Name of the filter provider type + * @return The GraniteGuardianFilterConfig builder. + */ + Builder1 type(@Nonnull final TypeEnum type); + } + + /** Builder helper class. */ + public interface Builder1 { + /** + * Set the config of this {@link GraniteGuardianFilterConfig} instance. + * + * @param config The config of this {@link GraniteGuardianFilterConfig} + * @return The GraniteGuardianFilterConfig instance. + */ + GraniteGuardianFilterConfig config(@Nonnull final GraniteGuardian41 config); + } +} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingFilterSearchConfiguration.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingFilterSearchConfiguration.java index 44bd97e3f..16cf61bc8 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingFilterSearchConfiguration.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingFilterSearchConfiguration.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfig.java index 1df217d50..83620a8ee 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfig.java index 58300b2b7..9ad4f9308 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfigFiltersInner.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfigFiltersInner.java index 3b8cfef76..0af47db17 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfigFiltersInner.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfigFiltersInner.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfigPlaceholders.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfigPlaceholders.java index 4c7c1773e..89ce96c3b 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfigPlaceholders.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/GroundingModuleConfigConfigPlaceholders.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContent.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContent.java index 417cad3c8..d48cee5a4 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContent.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContent.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContentImageUrl.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContentImageUrl.java index d291889ef..bff6f53f3 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContentImageUrl.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContentImageUrl.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContentUrl.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContentUrl.java index 81c8087dc..438015848 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContentUrl.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ImageContentUrl.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilterConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilterConfig.java index 879a5c91b..994742607 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilterConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilterConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * @@ -18,6 +18,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) @JsonSubTypes({ @JsonSubTypes.Type(value = AzureContentSafetyInputFilterConfig.class), + @JsonSubTypes.Type(value = GraniteGuardianFilterConfig.class), @JsonSubTypes.Type(value = LlamaGuard38bFilterConfig.class), }) public interface InputFilterConfig {} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilterTargetSelector.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilterTargetSelector.java new file mode 100644 index 000000000..64c4e3588 --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilterTargetSelector.java @@ -0,0 +1,26 @@ +/* + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.ai.sdk.prompt.registry.model; + +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; + +/** + * Selector for scoping input filtering to a subset of the combined message list (messages_history + * prepended to template). If not present, all input content is filtered. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) +@JsonSubTypes({ + @JsonSubTypes.Type(value = AfterLastRoleTargetSelector.class), + @JsonSubTypes.Type(value = LastMessagesTargetSelector.class), +}) +public interface InputFilterTargetSelector {} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilteringConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilteringConfig.java index 19d54e79f..3b3fe3bd5 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilteringConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/InputFilteringConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/KeyValueListPair.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/KeyValueListPair.java index f5ed72bda..a2184492f 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/KeyValueListPair.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/KeyValueListPair.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LLMModelDetails.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LLMModelDetails.java index eb44c7949..29dca916c 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LLMModelDetails.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LLMModelDetails.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * @@ -47,6 +47,9 @@ public class LLMModelDetails @JsonProperty("max_retries") private Integer maxRetries = 2; + @JsonProperty("drop_unsupported_params") + private Boolean dropUnsupportedParams = true; + @JsonAnySetter @JsonAnyGetter private final Map cloudSdkCustomFields = new LinkedHashMap<>(); @@ -239,6 +242,53 @@ public void setMaxRetries(@Nullable final Integer maxRetries) { this.maxRetries = maxRetries; } + /** + * Set the dropUnsupportedParams of this {@link LLMModelDetails} instance and return the same + * instance. + * + * @param dropUnsupportedParams Controls behaviour when Chat Completions parameters not supported + * by the Responses API are present in the request. Only applies to models that use the + * Responses API (responsesApiOnly: true in the model registry). When true (default): + * unsupported params are silently dropped and reported in the + * X-Orchestration-Dropped-Model-Params response header. When false: any unsupported parameter + * causes a 400 error with an actionable message. + * @return The same instance of this {@link LLMModelDetails} class + */ + @Nonnull + public LLMModelDetails dropUnsupportedParams(@Nullable final Boolean dropUnsupportedParams) { + this.dropUnsupportedParams = dropUnsupportedParams; + return this; + } + + /** + * Controls behaviour when Chat Completions parameters not supported by the Responses API are + * present in the request. Only applies to models that use the Responses API (responsesApiOnly: + * true in the model registry). When true (default): unsupported params are silently dropped and + * reported in the X-Orchestration-Dropped-Model-Params response header. When false: any + * unsupported parameter causes a 400 error with an actionable message. + * + * @return dropUnsupportedParams The dropUnsupportedParams of this {@link LLMModelDetails} + * instance. + */ + @Nonnull + public Boolean isDropUnsupportedParams() { + return dropUnsupportedParams; + } + + /** + * Set the dropUnsupportedParams of this {@link LLMModelDetails} instance. + * + * @param dropUnsupportedParams Controls behaviour when Chat Completions parameters not supported + * by the Responses API are present in the request. Only applies to models that use the + * Responses API (responsesApiOnly: true in the model registry). When true (default): + * unsupported params are silently dropped and reported in the + * X-Orchestration-Dropped-Model-Params response header. When false: any unsupported parameter + * causes a 400 error with an actionable message. + */ + public void setDropUnsupportedParams(@Nullable final Boolean dropUnsupportedParams) { + this.dropUnsupportedParams = dropUnsupportedParams; + } + /** * Get the names of the unrecognizable properties of the {@link LLMModelDetails}. * @@ -282,6 +332,8 @@ public Map toMap() { if (params != null) declaredFields.put("params", params); if (timeout != null) declaredFields.put("timeout", timeout); if (maxRetries != null) declaredFields.put("maxRetries", maxRetries); + if (dropUnsupportedParams != null) + declaredFields.put("dropUnsupportedParams", dropUnsupportedParams); return declaredFields; } @@ -311,12 +363,14 @@ public boolean equals(@Nullable final java.lang.Object o) { && Objects.equals(this.version, llMModelDetails.version) && Objects.equals(this.params, llMModelDetails.params) && Objects.equals(this.timeout, llMModelDetails.timeout) - && Objects.equals(this.maxRetries, llMModelDetails.maxRetries); + && Objects.equals(this.maxRetries, llMModelDetails.maxRetries) + && Objects.equals(this.dropUnsupportedParams, llMModelDetails.dropUnsupportedParams); } @Override public int hashCode() { - return Objects.hash(name, version, params, timeout, maxRetries, cloudSdkCustomFields); + return Objects.hash( + name, version, params, timeout, maxRetries, dropUnsupportedParams, cloudSdkCustomFields); } @Override @@ -329,6 +383,9 @@ public String toString() { sb.append(" params: ").append(toIndentedString(params)).append("\n"); sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n"); sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n"); + sb.append(" dropUnsupportedParams: ") + .append(toIndentedString(dropUnsupportedParams)) + .append("\n"); cloudSdkCustomFields.forEach( (k, v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LastMessagesTargetSelector.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LastMessagesTargetSelector.java new file mode 100644 index 000000000..71023335c --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LastMessagesTargetSelector.java @@ -0,0 +1,199 @@ +/* + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.sap.ai.sdk.prompt.registry.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Set; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + +/** LastMessagesTargetSelector */ +// CHECKSTYLE:OFF +public class LastMessagesTargetSelector implements InputFilterTargetSelector +// CHECKSTYLE:ON +{ + @JsonProperty("last_messages") + private Integer lastMessages; + + @JsonAnySetter @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** Default constructor for LastMessagesTargetSelector. */ + protected LastMessagesTargetSelector() {} + + /** + * Set the lastMessages of this {@link LastMessagesTargetSelector} instance and return the same + * instance. + * + * @param lastMessages Number of messages from the end of the combined message list to include in + * filtering. Must be >= 1 (0 is not allowed and returns 400 Bad Request). If + * specified value is larger than the combined message list length, all messages are filtered. + * Minimum: 1 + * @return The same instance of this {@link LastMessagesTargetSelector} class + */ + @Nonnull + public LastMessagesTargetSelector lastMessages(@Nonnull final Integer lastMessages) { + this.lastMessages = lastMessages; + return this; + } + + /** + * Number of messages from the end of the combined message list to include in filtering. Must be + * >= 1 (0 is not allowed and returns 400 Bad Request). If specified value is larger than + * the combined message list length, all messages are filtered. minimum: 1 + * + * @return lastMessages The lastMessages of this {@link LastMessagesTargetSelector} instance. + */ + @Nonnull + public Integer getLastMessages() { + return lastMessages; + } + + /** + * Set the lastMessages of this {@link LastMessagesTargetSelector} instance. + * + * @param lastMessages Number of messages from the end of the combined message list to include in + * filtering. Must be >= 1 (0 is not allowed and returns 400 Bad Request). If + * specified value is larger than the combined message list length, all messages are filtered. + * Minimum: 1 + */ + public void setLastMessages(@Nonnull final Integer lastMessages) { + this.lastMessages = lastMessages; + } + + /** + * Get the names of the unrecognizable properties of the {@link LastMessagesTargetSelector}. + * + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link LastMessagesTargetSelector} + * instance. + * + * @deprecated Use {@link #toMap()} instead. + * @param name The name of the property + * @return The value of the property + * @throws NoSuchElementException If no property with the given name could be found. + */ + @Nullable + @Deprecated + public Object getCustomField(@Nonnull final String name) throws NoSuchElementException { + if (!cloudSdkCustomFields.containsKey(name)) { + throw new NoSuchElementException( + "LastMessagesTargetSelector has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link LastMessagesTargetSelector} instance including + * unrecognized properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if (lastMessages != null) declaredFields.put("lastMessages", lastMessages); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link LastMessagesTargetSelector} instance. If the map + * previously contained a mapping for the key, the old value is replaced by the specified value. + * + * @param customFieldName The name of the property + * @param customFieldValue The value of the property + */ + @JsonIgnore + public void setCustomField(@Nonnull String customFieldName, @Nullable Object customFieldValue) { + cloudSdkCustomFields.put(customFieldName, customFieldValue); + } + + @Override + public boolean equals(@Nullable final java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + final LastMessagesTargetSelector lastMessagesTargetSelector = (LastMessagesTargetSelector) o; + return Objects.equals( + this.cloudSdkCustomFields, lastMessagesTargetSelector.cloudSdkCustomFields) + && Objects.equals(this.lastMessages, lastMessagesTargetSelector.lastMessages); + } + + @Override + public int hashCode() { + return Objects.hash(lastMessages, cloudSdkCustomFields); + } + + @Override + @Nonnull + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class LastMessagesTargetSelector {\n"); + sb.append(" lastMessages: ").append(toIndentedString(lastMessages)).append("\n"); + cloudSdkCustomFields.forEach( + (k, v) -> + sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(final java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + /** + * Create a type-safe, fluent-api builder object to construct a new {@link + * LastMessagesTargetSelector} instance with all required arguments. + */ + public static Builder create() { + return (lastMessages) -> new LastMessagesTargetSelector().lastMessages(lastMessages); + } + + /** Builder helper class. */ + public interface Builder { + /** + * Set the lastMessages of this {@link LastMessagesTargetSelector} instance. + * + * @param lastMessages Number of messages from the end of the combined message list to include + * in filtering. Must be >= 1 (0 is not allowed and returns 400 Bad Request). If + * specified value is larger than the combined message list length, all messages are + * filtered. + * @return The LastMessagesTargetSelector instance. + */ + LastMessagesTargetSelector lastMessages(@Nonnull final Integer lastMessages); + } +} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38b.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38b.java index 5ddb9cf21..374e518b5 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38b.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38b.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38bFilterConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38bFilterConfig.java index 71daecc86..d43be5c77 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38bFilterConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/LlamaGuard38bFilterConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * @@ -95,6 +95,9 @@ public static TypeEnum fromValue(@Nonnull final String value) { @JsonProperty("config") private LlamaGuard38b config; + @JsonProperty("target_selector") + private InputFilterTargetSelector targetSelector; + @JsonAnySetter @JsonAnyGetter private final Map cloudSdkCustomFields = new LinkedHashMap<>(); @@ -165,6 +168,39 @@ public void setConfig(@Nonnull final LlamaGuard38b config) { this.config = config; } + /** + * Set the targetSelector of this {@link LlamaGuard38bFilterConfig} instance and return the same + * instance. + * + * @param targetSelector The targetSelector of this {@link LlamaGuard38bFilterConfig} + * @return The same instance of this {@link LlamaGuard38bFilterConfig} class + */ + @Nonnull + public LlamaGuard38bFilterConfig targetSelector( + @Nullable final InputFilterTargetSelector targetSelector) { + this.targetSelector = targetSelector; + return this; + } + + /** + * Get targetSelector + * + * @return targetSelector The targetSelector of this {@link LlamaGuard38bFilterConfig} instance. + */ + @Nonnull + public InputFilterTargetSelector getTargetSelector() { + return targetSelector; + } + + /** + * Set the targetSelector of this {@link LlamaGuard38bFilterConfig} instance. + * + * @param targetSelector The targetSelector of this {@link LlamaGuard38bFilterConfig} + */ + public void setTargetSelector(@Nullable final InputFilterTargetSelector targetSelector) { + this.targetSelector = targetSelector; + } + /** * Get the names of the unrecognizable properties of the {@link LlamaGuard38bFilterConfig}. * @@ -206,6 +242,7 @@ public Map toMap() { final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); if (type != null) declaredFields.put("type", type); if (config != null) declaredFields.put("config", config); + if (targetSelector != null) declaredFields.put("targetSelector", targetSelector); return declaredFields; } @@ -232,12 +269,13 @@ public boolean equals(@Nullable final java.lang.Object o) { final LlamaGuard38bFilterConfig llamaGuard38bFilterConfig = (LlamaGuard38bFilterConfig) o; return Objects.equals(this.cloudSdkCustomFields, llamaGuard38bFilterConfig.cloudSdkCustomFields) && Objects.equals(this.type, llamaGuard38bFilterConfig.type) - && Objects.equals(this.config, llamaGuard38bFilterConfig.config); + && Objects.equals(this.config, llamaGuard38bFilterConfig.config) + && Objects.equals(this.targetSelector, llamaGuard38bFilterConfig.targetSelector); } @Override public int hashCode() { - return Objects.hash(type, config, cloudSdkCustomFields); + return Objects.hash(type, config, targetSelector, cloudSdkCustomFields); } @Override @@ -247,6 +285,7 @@ public String toString() { sb.append("class LlamaGuard38bFilterConfig {\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); + sb.append(" targetSelector: ").append(toIndentedString(targetSelector)).append("\n"); cloudSdkCustomFields.forEach( (k, v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n")); diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfig.java index c39891dbe..c6a074dde 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfigMaskingProviders.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfigMaskingProviders.java index 203140281..037a19ebb 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfigMaskingProviders.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfigMaskingProviders.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfigProviders.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfigProviders.java index b291564be..81b0359fa 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfigProviders.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MaskingModuleConfigProviders.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MessageToolCall.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MessageToolCall.java index 24a30b898..f6a3e1627 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MessageToolCall.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MessageToolCall.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MessageToolCallFunction.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MessageToolCallFunction.java index 8307db42f..7a99a3405 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MessageToolCallFunction.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MessageToolCallFunction.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ModuleConfigs.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ModuleConfigs.java index aa356bbab..10914d8a8 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ModuleConfigs.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ModuleConfigs.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MultiChatContent.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MultiChatContent.java index 8ed42504c..706de7fca 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MultiChatContent.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MultiChatContent.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MultiChatTemplate.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MultiChatTemplate.java index ad40f2642..98ac8363b 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MultiChatTemplate.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/MultiChatTemplate.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigDeleteResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigDeleteResponse.java index e44de9301..47da68019 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigDeleteResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigDeleteResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigGetResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigGetResponse.java index d1bee5566..15c510d97 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigGetResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigGetResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigHistoryDeleteResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigHistoryDeleteResponse.java index 2187c4393..cf3666b56 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigHistoryDeleteResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigHistoryDeleteResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigListResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigListResponse.java index 105caf3c9..9a079324a 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigListResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigListResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigPostRequest.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigPostRequest.java index c06896fab..aaf6a2027 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigPostRequest.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigPostRequest.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigPostResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigPostResponse.java index 9fd8d6688..63b22ead9 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigPostResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigPostResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigResource.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigResource.java index 16addc945..1e62708e5 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigResource.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigResource.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigScenarioDeleteResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigScenarioDeleteResponse.java index f01587be1..6d1e608c8 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigScenarioDeleteResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OrchestrationConfigScenarioDeleteResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OutputFilterConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OutputFilterConfig.java index da6d2d408..28afa78c7 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OutputFilterConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OutputFilterConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * @@ -18,6 +18,7 @@ @JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION) @JsonSubTypes({ @JsonSubTypes.Type(value = AzureContentSafetyOutputFilterConfig.class), + @JsonSubTypes.Type(value = GraniteGuardianFilterConfig.class), @JsonSubTypes.Type(value = LlamaGuard38bFilterConfig.class), }) public interface OutputFilterConfig {} diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OutputFilteringConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OutputFilteringConfig.java index 3bd622726..230363664 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OutputFilteringConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/OutputFilteringConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialModuleConfigs.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialModuleConfigs.java index ccd48d0d0..602cd83b1 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialModuleConfigs.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialModuleConfigs.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialPromptTemplatingModuleConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialPromptTemplatingModuleConfig.java index 2ca6a06d3..87b1c8774 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialPromptTemplatingModuleConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialPromptTemplatingModuleConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialPromptTemplatingModuleConfigPrompt.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialPromptTemplatingModuleConfigPrompt.java index eb7f68b90..33aa1e370 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialPromptTemplatingModuleConfigPrompt.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PartialPromptTemplatingModuleConfigPrompt.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptRegistryOrchestrationConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptRegistryOrchestrationConfig.java index ce2935ea4..d6fff0667 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptRegistryOrchestrationConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptRegistryOrchestrationConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptRegistryOrchestrationConfigModules.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptRegistryOrchestrationConfigModules.java index a232ea22a..a17feb6b7 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptRegistryOrchestrationConfigModules.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptRegistryOrchestrationConfigModules.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplate.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplate.java index 7910e9de2..f6223788e 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplate.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplate.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateDeleteResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateDeleteResponse.java index 3d656de55..94bbc5734 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateDeleteResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateDeleteResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateGetResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateGetResponse.java index 18ad9b2f4..c6141b046 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateGetResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateGetResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateHistoryDeleteResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateHistoryDeleteResponse.java index 19580ec82..336c7dd31 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateHistoryDeleteResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateHistoryDeleteResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateListResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateListResponse.java index f6ee9ec70..d5e6098f7 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateListResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateListResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatePostRequest.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatePostRequest.java index dc1c1c2e8..f5c35cce6 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatePostRequest.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatePostRequest.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatePostResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatePostResponse.java index 66b7af621..2956a860d 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatePostResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatePostResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateScenarioDeleteResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateScenarioDeleteResponse.java index 20ba0b6c3..c51e4a839 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateScenarioDeleteResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateScenarioDeleteResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSpec.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSpec.java index 02af6a027..7eafe4303 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSpec.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSpec.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSpecResponseFormat.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSpecResponseFormat.java index eb06e64be..32fd6765d 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSpecResponseFormat.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSpecResponseFormat.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSubstitutionRequest.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSubstitutionRequest.java index b1b2f5e1d..39e1797c3 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSubstitutionRequest.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSubstitutionRequest.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSubstitutionResponse.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSubstitutionResponse.java index 57e85e654..a62e9e492 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSubstitutionResponse.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplateSubstitutionResponse.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatingModuleConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatingModuleConfig.java index badfa1166..973b36616 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatingModuleConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/PromptTemplatingModuleConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ReasoningBlock.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ReasoningBlock.java index af9478ab2..0f1fa2e14 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ReasoningBlock.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ReasoningBlock.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonObject.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonObject.java index 8fd1becb9..2dad8d406 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonObject.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonObject.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonSchema.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonSchema.java index 9a740694a..34f3fef8b 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonSchema.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonSchema.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonSchemaJsonSchema.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonSchemaJsonSchema.java index 8a61710cb..85a70f983 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonSchemaJsonSchema.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatJsonSchemaJsonSchema.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatText.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatText.java index a43a99006..0c6baa414 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatText.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ResponseFormatText.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimeOrchestrationConfigFile.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimeOrchestrationConfigFile.java index 013176658..3be05bfae 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimeOrchestrationConfigFile.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimeOrchestrationConfigFile.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimePromptTemplateFile.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimePromptTemplateFile.java index 28ece9215..2915ff8ed 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimePromptTemplateFile.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimePromptTemplateFile.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimePromptTemplateFileMetadata.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimePromptTemplateFileMetadata.java index f2ff9ab46..41b721148 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimePromptTemplateFileMetadata.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/RuntimePromptTemplateFileMetadata.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationApplyToSelector.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationApplyToSelector.java index 441c50caa..0e35484da 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationApplyToSelector.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationApplyToSelector.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationInput.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationInput.java index cdccb3aa2..6c559b3eb 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationInput.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationInput.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationInputConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationInputConfig.java index c316d1e6e..d30f27d1f 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationInputConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationInputConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutput.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutput.java index 6d9d173dd..166facbd9 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutput.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutput.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutputConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutputConfig.java index f85d2e7d7..18dfee6fd 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutputConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutputConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutputTargetLanguage.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutputTargetLanguage.java index f2f05caf6..3761fbf8a 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutputTargetLanguage.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SAPDocumentTranslationOutputTargetLanguage.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SchemasChatCompletionTool.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SchemasChatCompletionTool.java index 55272f705..064e715bc 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SchemasChatCompletionTool.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SchemasChatCompletionTool.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SchemasTextContent.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SchemasTextContent.java index 38eafc542..712365112 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SchemasTextContent.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SchemasTextContent.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SearchDocumentKeyValueListPair.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SearchDocumentKeyValueListPair.java index 87d8ee034..a0d2bccdb 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SearchDocumentKeyValueListPair.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SearchDocumentKeyValueListPair.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SearchSelectOptionEnum.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SearchSelectOptionEnum.java index 8c8e444df..366244a61 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SearchSelectOptionEnum.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SearchSelectOptionEnum.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SingleChatTemplate.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SingleChatTemplate.java index 0f15cc5ac..ef4667fca 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SingleChatTemplate.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SingleChatTemplate.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SystemChatMessage.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SystemChatMessage.java index cb9439e4e..b65227aa4 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SystemChatMessage.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/SystemChatMessage.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/Template.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/Template.java index 9ea4fd0c6..92afbdae1 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/Template.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/Template.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRef.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRef.java index 6b63eec1b..a5e99e277 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRef.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRef.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefByID.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefByID.java index 4cf0d93ec..93330bfe3 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefByID.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefByID.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefByScenarioNameVersion.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefByScenarioNameVersion.java index 1557c82d1..c9ebee1a9 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefByScenarioNameVersion.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefByScenarioNameVersion.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefTemplateRef.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefTemplateRef.java index 1b1403b8b..f8978ae42 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefTemplateRef.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateRefTemplateRef.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateResponseFormat.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateResponseFormat.java index c561bac7a..5351e4c85 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateResponseFormat.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TemplateResponseFormat.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TextContent.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TextContent.java index 154eca412..7017e270e 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TextContent.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TextContent.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ToolChatMessage.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ToolChatMessage.java index 32f435e05..8d843eb7b 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ToolChatMessage.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/ToolChatMessage.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TranslationModuleConfig.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TranslationModuleConfig.java index 7e106e612..e33fdf1fd 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TranslationModuleConfig.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/TranslationModuleConfig.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessage.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessage.java index 3011a85d4..ba9aa6491 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessage.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessage.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessageContent.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessageContent.java index f104a6e31..c8058259c 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessageContent.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessageContent.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessageContentItem.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessageContentItem.java index 3d6af62f7..adaeb466a 100644 --- a/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessageContentItem.java +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/UserChatMessageContentItem.java @@ -1,6 +1,6 @@ /* - * Prompt Registry API - * Prompt Storage service for Design time & Runtime prompt templates. + * Prompt Registry + * The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. * * * diff --git a/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml b/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml index a3b4ee8e3..dcee1d1ef 100644 --- a/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml +++ b/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml @@ -1,21 +1,41 @@ openapi: 3.0.0 info: - version: 0.0.1 - title: Prompt Registry API - description: Prompt Storage service for Design time & Runtime prompt templates. + title: Prompt Registry + description: The Prompt Registry simplifies the lifecycle management of prompt templates across design and runtime environments. It comes with an imperative and declarative interface. This API specification describes the imperative API for managing prompt templates and also allows the retrieval of declarative managed prompt templates. A prompt template consists of chat messages where placeholders can be defined together with default values. Additional information such as metadata tags can be added to the resource as well. + version: 0.14.4 +servers: + - url: https://api.ai.{region}.ml.hana.ondemand.com/v2 + description: Production endpoint for SAP AI Core + variables: + region: + enum: + - prod.eu-central-1.aws + - prodeuonly.eu-central-1.aws + - prod.us-east-1.aws + - prod.ap-northeast-1.aws + - prod.ap-southeast-2.aws + - prod-eu20.westeurope.azure + - prod-us21.eastus.azure + - prod-eu30.europe-west3.gcp + - prod-us30.us-central1.gcp + default: prod.eu-central-1.aws tags: - - name: prompt templates - description: Tag for prompt templates operations - - name: orchestration configs - description: Tag for orchestration configs operations + - name: Prompt Templates + description: Lifecycle management of prompt templates + - name: Orchestration Configs + description: Lifecycle management of orchestration configs +externalDocs: + description: Documentation for SAP AI Core - Prompt Registry + url: https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/prompt-registry?version=CLOUD paths: /lm/promptTemplates: post: operationId: registry.controller.prompt_controller.create_update_prompt_template x-sap-cloud-sdk-operation-name: createUpdatePromptTemplate description: Create or update a prompt template + summary: Prompt template create tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' @@ -42,30 +62,36 @@ paths: operationId: registry.controller.prompt_controller.list_prompt_templates x-sap-cloud-sdk-operation-name: listPromptTemplates description: List prompt templates + summary: Prompt template list tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' - name: scenario in: query + description: Scenario field of the resource. schema: type: string - name: name in: query + description: Name field of the resource. schema: type: string - name: version in: query + description: Version field of the resource. schema: type: string - name: retrieve in: query + description: Whether to retrieve 'imperative', 'declarative', or 'both'. schema: type: string default: both - name: includeSpec in: query + description: Whether include the spec section or not. schema: type: boolean default: false @@ -95,15 +121,17 @@ paths: delete: operationId: registry.controller.prompt_controller.delete_prompt_templates_by_scenario x-sap-cloud-sdk-operation-name: deletePromptTemplatesByScenario - description: Delete all imperative prompt templates in the given scenario. + summary: Prompt template scenario delete + description: Delete all imperatively managed prompt templates in a scenario tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' - name: scenario in: path required: true + description: Scenario field of the resource. schema: type: string responses: @@ -123,25 +151,29 @@ paths: delete: operationId: registry.controller.prompt_controller.delete_prompt_template_history x-sap-cloud-sdk-operation-name: deletePromptTemplateHistory - description: Delete all non-current versions (history) for the given prompt template + summary: Prompt template history delete + description: Delete the version history of an imperatively managed prompt template tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' - name: scenario in: path required: true + description: Scenario field of the resource. schema: type: string - name: version in: path required: true + description: Version field of the resource. schema: type: string - name: name in: path required: true + description: Name field of the resource. schema: type: string responses: @@ -161,23 +193,27 @@ paths: operationId: registry.controller.prompt_controller.list_prompt_template_history x-sap-cloud-sdk-operation-name: listPromptTemplateHistory description: List prompt template history + summary: Prompt template history tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' - name: scenario in: path + description: Scenario field of the resource. required: true schema: type: string - name: version in: path + description: Version field of the resource. required: true schema: type: string - name: name in: path + description: Name field of the resource. required: true schema: type: string @@ -208,14 +244,16 @@ paths: operationId: registry.controller.prompt_controller.get_prompt_template_by_uuid x-sap-cloud-sdk-operation-name: getPromptTemplateByUuid description: Get prompt template by UUID + summary: Prompt template get tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' - name: promptTemplateId in: path required: true + description: UUID of the prompt template. schema: type: string format: uuid @@ -235,14 +273,16 @@ paths: delete: operationId: registry.controller.prompt_controller.delete_prompt_template x-sap-cloud-sdk-operation-name: deletePromptTemplate - description: Delete prompt template + description: Delete an imperatively managed prompt template + summary: Prompt template delete tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' - name: promptTemplateId in: path + description: UUID of the prompt template. required: true schema: type: string @@ -264,9 +304,10 @@ paths: post: operationId: registry.controller.prompt_controller.import_prompt_template x-sap-cloud-sdk-operation-name: importPromptTemplate - description: Import prompt template + summary: Prompt template create + description: Create an imperatively managed prompt template from a file tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' @@ -294,15 +335,17 @@ paths: get: operationId: registry.controller.prompt_controller.export_prompt_template x-sap-cloud-sdk-operation-name: exportPromptTemplate - description: Export prompt template + summary: Prompt template export + description: Download a prompt template as a file tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' - name: promptTemplateId in: path required: true + description: UUID of the prompt template. schema: type: string format: uuid @@ -322,19 +365,22 @@ paths: post: operationId: registry.controller.prompt_controller.parse_prompt_template_by_id x-sap-cloud-sdk-operation-name: parsePromptTemplateById - description: Parse prompt template by ID + summary: Prompt template fill + description: Fill the placeholders of a prompt template that is identified by its UUID tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' - name: promptTemplateId in: path required: true + description: UUID of the prompt template. schema: type: string format: uuid - name: metadata + description: Whether to not include metadata in the response. in: query schema: type: boolean @@ -361,29 +407,34 @@ paths: post: operationId: registry.controller.prompt_controller.parse_prompt_template_by_name_version x-sap-cloud-sdk-operation-name: parsePromptTemplateByNameVersion - description: Parse prompt template by name and version + summary: Prompt template fill + description: Fill the placeholders of a prompt template that is identified by its scenario, name and version tags: - - prompt templates + - Prompt Templates parameters: - $ref: '#/components/parameters/ai-resource-group' - $ref: '#/components/parameters/ai-resource-group-scope' - name: scenario in: path required: true + description: Scenario field of the resource. schema: type: string - name: version in: path required: true + description: Version field of the resource. schema: type: string - name: name in: path required: true + description: Name field of the resource. schema: type: string - name: metadata in: query + description: Whether to not include metadata in the response. schema: type: boolean default: false @@ -409,9 +460,10 @@ paths: post: operationId: registry.controller.orchestration_config_controller.create_update_orchestration_config x-sap-cloud-sdk-operation-name: createUpdateOrchestrationConfig - description: Create or update an orchestration config + description: Create or update an imperatively managed orchestration config + summary: Orchestration config create tags: - - orchestration configs + - Orchestration Configs parameters: - $ref: '#/components/parameters/ai-resource-group' requestBody: @@ -436,25 +488,30 @@ paths: get: operationId: registry.controller.orchestration_config_controller.list_orchestration_configs x-sap-cloud-sdk-operation-name: listOrchestrationConfigs - description: List orchestration configs + description: List imperatively and declaratively managed orchestration config + summary: Orchestration config list tags: - - orchestration configs + - Orchestration Configs parameters: - $ref: '#/components/parameters/ai-resource-group' - name: scenario in: query + description: Scenario field of the resource. schema: type: string - name: name in: query + description: Name field of the resource. schema: type: string - name: version in: query + description: Version field of the resource. schema: type: string - name: retrieve in: query + description: Whether to retrieve 'imperative', 'declarative', or 'both'. schema: type: string default: both @@ -465,23 +522,25 @@ paths: - name: include_spec in: query deprecated: true - description: 'DEPRECATED: Use includeSpec instead' + description: 'DEPRECATED: Use includeSpec instead.' schema: type: boolean default: false - name: includeSpec in: query + description: Whether the spec should be included in the response. schema: type: boolean - name: resolve_template_ref in: query deprecated: true - description: 'DEPRECATED: Use resolveTemplateRef instead' + description: 'DEPRECATED: Use resolveTemplateRef instead.' schema: type: boolean default: false - name: resolveTemplateRef in: query + description: Whether a template reference should be resolved schema: type: boolean - $ref: '#/components/parameters/top' @@ -510,14 +569,16 @@ paths: delete: operationId: registry.controller.orchestration_config_controller.delete_orchestration_configs_by_scenario x-sap-cloud-sdk-operation-name: deleteOrchestrationConfigsByScenario - description: Delete all imperative orchestration configs in the given scenario. + summary: Orchestration config scenario delete + description: Delete all imperatively managed orchestration configs in a scenario tags: - - orchestration configs + - Orchestration Configs parameters: - $ref: '#/components/parameters/ai-resource-group' - name: scenario in: path required: true + description: Scenario field of the resource. schema: type: string responses: @@ -537,24 +598,28 @@ paths: delete: operationId: registry.controller.orchestration_config_controller.delete_orchestration_config_history x-sap-cloud-sdk-operation-name: deleteOrchestrationConfigHistory - description: Delete all non-current versions (history) for the given orchestration config + summary: Orchestration config history delete + description: Delete the version history of an imperatively managed orchestration config tags: - - orchestration configs + - Orchestration Configs parameters: - $ref: '#/components/parameters/ai-resource-group' - name: scenario in: path required: true + description: Scenario field of the resource. schema: type: string - name: version in: path required: true + description: Version field of the resource. schema: type: string - name: name in: path required: true + description: Name field of the resource. schema: type: string responses: @@ -573,46 +638,52 @@ paths: get: operationId: registry.controller.orchestration_config_controller.list_orchestration_config_history x-sap-cloud-sdk-operation-name: listOrchestrationConfigHistory - description: List orchestration config history + summary: Orchestration config history + description: Obtain the history of edits of a particular imperatively managed orchestration config tags: - - orchestration configs + - Orchestration Configs parameters: - $ref: '#/components/parameters/ai-resource-group' - name: scenario in: path required: true + description: Scenario field of the resource. schema: type: string - name: version in: path required: true + description: Version field of the resource. schema: type: string - name: name in: path required: true + description: Name field of the resource. schema: type: string - name: include_spec in: query deprecated: true - description: 'DEPRECATED: Use includeSpec instead' + description: 'DEPRECATED: Use includeSpec instead.' schema: type: boolean default: false - name: includeSpec in: query + description: Whether include the spec section or not. schema: type: boolean - name: resolve_template_ref in: query deprecated: true - description: 'DEPRECATED: Use resolveTemplateRef instead' + description: 'DEPRECATED: Use resolveTemplateRef instead.' schema: type: boolean default: false - name: resolveTemplateRef in: query + description: Whether a template reference should be resolved schema: type: boolean - $ref: '#/components/parameters/top' @@ -641,26 +712,29 @@ paths: get: operationId: registry.controller.orchestration_config_controller.get_orchestration_config_by_uuid x-sap-cloud-sdk-operation-name: getOrchestrationConfigByUuid - description: Get orchestration config by UUID + summary: Orchestration config get + description: Retrieve a orchestration config by its UUID tags: - - orchestration configs + - Orchestration Configs parameters: - $ref: '#/components/parameters/ai-resource-group' - name: orchestrationConfigId in: path required: true + description: UUID of the resource. schema: type: string format: uuid - name: resolve_template_ref in: query deprecated: true - description: 'DEPRECATED: Use resolveTemplateRef instead' + description: 'DEPRECATED: Use resolveTemplateRef instead.' schema: type: boolean default: false - name: resolveTemplateRef in: query + description: Whether a template reference should be resolved schema: type: boolean responses: @@ -679,14 +753,16 @@ paths: delete: operationId: registry.controller.orchestration_config_controller.delete_orchestration_config x-sap-cloud-sdk-operation-name: deleteOrchestrationConfig - description: Delete orchestration config + summary: Orchestration config delete + description: Delete an imperatively managed orchestration config tags: - - orchestration configs + - Orchestration Configs parameters: - $ref: '#/components/parameters/ai-resource-group' - name: orchestrationConfigId in: path required: true + description: UUID of the resource. schema: type: string format: uuid @@ -707,9 +783,10 @@ paths: post: operationId: registry.controller.orchestration_config_controller.import_orchestration_config x-sap-cloud-sdk-operation-name: importOrchestrationConfig - description: Import orchestration config + summary: Orchestration config create + description: Create an imperatively managed orchestration config from a file tags: - - orchestration configs + - Orchestration Configs parameters: - $ref: '#/components/parameters/ai-resource-group' requestBody: @@ -736,14 +813,16 @@ paths: get: operationId: registry.controller.orchestration_config_controller.export_orchestration_config x-sap-cloud-sdk-operation-name: exportOrchestrationConfig - description: Export orchestration config + summary: Orchestration config export + description: Download an orchestration config as a file tags: - - orchestration configs + - Orchestration Configs parameters: - $ref: '#/components/parameters/ai-resource-group' - name: orchestrationConfigId in: path required: true + description: UUID of the resource. schema: type: string format: uuid @@ -760,6 +839,14 @@ paths: default: $ref: '#/components/responses/CommonError' components: + securitySchemes: + Oauth2: + type: oauth2 + description: OAuth client credentials (client ID and secret) are required. These can be requested from SAP BTP cloud cockpit. + flows: + clientCredentials: + tokenUrl: https://(subdomain_identity_zone).authentication.(host)/oauth/token + scopes: {} schemas: PromptTemplate: oneOf: @@ -1631,6 +1718,11 @@ components: default: 2 minimum: 0 maximum: 5 + drop_unsupported_params: + type: boolean + default: true + description: | + Controls behaviour when Chat Completions parameters not supported by the Responses API are present in the request. Only applies to models that use the Responses API (responsesApiOnly: true in the model registry). When true (default): unsupported params are silently dropped and reported in the X-Orchestration-Dropped-Model-Params response header. When false: any unsupported parameter causes a 400 error with an actionable message. PartialPromptTemplatingModuleConfig: description: | Partial prompt templating configuration for use with config_ref overrides. model is optional so that only the prompt can be overridden without repeating the model config. @@ -1670,6 +1762,39 @@ components: type: boolean description: Filter prompts for harmful content such as jailbreaks and prompt injections. default: false + AfterLastRoleTargetSelector: + type: object + additionalProperties: false + required: + - after_last_role + properties: + after_last_role: + type: string + description: | + Filter all messages after the last message with this role in the combined message list. If no message is scoped after applying this filter, then the filter is skipped. + enum: + - system + - user + - assistant + - developer + - tool + LastMessagesTargetSelector: + type: object + additionalProperties: false + required: + - last_messages + properties: + last_messages: + type: integer + minimum: 1 + description: | + Number of messages from the end of the combined message list to include in filtering. Must be >= 1 (0 is not allowed and returns 400 Bad Request). If specified value is larger than the combined message list length, all messages are filtered. + InputFilterTargetSelector: + oneOf: + - $ref: '#/components/schemas/AfterLastRoleTargetSelector' + - $ref: '#/components/schemas/LastMessagesTargetSelector' + description: | + Selector for scoping input filtering to a subset of the combined message list (messages_history prepended to template). If not present, all input content is filtered. AzureContentSafetyInputFilterConfig: type: object required: @@ -1684,6 +1809,8 @@ components: example: azure_content_safety config: $ref: '#/components/schemas/AzureContentSafetyInput' + target_selector: + $ref: '#/components/schemas/InputFilterTargetSelector' LlamaGuard38b: deprecated: true description: 'Filter configuration for Llama Guard 3 8B **DEPRECATED**: will be removed 2027-09-20.' @@ -1736,10 +1863,69 @@ components: example: llama_guard_3_8b config: $ref: '#/components/schemas/LlamaGuard38b' + target_selector: + $ref: '#/components/schemas/InputFilterTargetSelector' + GraniteGuardian41: + description: Configuration for IBM Granite Guardian 4.1 filter provider. + type: object + additionalProperties: false + required: + - categories + properties: + enable_reasoning: + type: boolean + default: false + description: 'Enable reasoning (think) mode for Granite Guardian. Applies to every configured category. Returns reasoning content when enabled, e.g. ''harm'': {''verdict'': true, ''reasoning'': ''...''}' + categories: + description: 'Content criteria to evaluate. Note: Granite Guardian requires separate calls for each configured content category. Recommendation: Use only `harm` catch all content category.' + type: object + additionalProperties: false + minProperties: 1 + properties: + harm: + type: boolean + description: Catch-all criterion for generally harmful content. + social_bias: + type: boolean + description: Detect prejudice or discrimination based on identity or protected characteristics. + jailbreak: + type: boolean + description: Detect attempts to manipulate the model into producing harmful or otherwise undesired outputs. + violence: + type: boolean + description: Detect content promoting or depicting physical, mental, or sexual harm. + profanity: + type: boolean + description: Detect offensive language or insults. + sexual_content: + type: boolean + description: Detect explicit or suggestive material of a sexual nature. + unethical_behavior: + type: boolean + description: Detect content describing actions that violate moral or legal standards. + GraniteGuardianFilterConfig: + type: object + description: Filter configuration for IBM Granite Guardian filter provider. + required: + - type + - config + additionalProperties: false + properties: + type: + description: Name of the filter provider type + type: string + enum: + - granite_guardian_4_1 + example: granite_guardian_4_1 + config: + $ref: '#/components/schemas/GraniteGuardian41' + target_selector: + $ref: '#/components/schemas/InputFilterTargetSelector' InputFilterConfig: oneOf: - $ref: '#/components/schemas/AzureContentSafetyInputFilterConfig' - $ref: '#/components/schemas/LlamaGuard38bFilterConfig' + - $ref: '#/components/schemas/GraniteGuardianFilterConfig' InputFilteringConfig: type: object required: @@ -1787,6 +1973,7 @@ components: oneOf: - $ref: '#/components/schemas/AzureContentSafetyOutputFilterConfig' - $ref: '#/components/schemas/LlamaGuard38bFilterConfig' + - $ref: '#/components/schemas/GraniteGuardianFilterConfig' FilteringStreamOptions: description: Stream options for output filtering. Will be ignored if stream is false. type: object @@ -2412,3 +2599,4 @@ components: type: integer minimum: 0 default: 0 +x-sap-shortText: Simplify the lifecycle management of prompt templates of your business AI scenarios.