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 32332e70f..bf8223c69 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 @@ -323,8 +323,9 @@ public byte[] exportOrchestrationConfig(@Nonnull final UUID orchestrationConfigI * * @param orchestrationConfigId (required) The value for the parameter orchestrationConfigId * @param aiResourceGroup (optional) Specify a resource group id to use - * @param resolveTemplateRef (optional, default to false) The value for the parameter - * resolveTemplateRef + * @param resolveTemplateRef (optional, default to false) DEPRECATED: Use resolveTemplateRef + * instead + * @param resolveTemplateRef2 (optional) The value for the parameter resolveTemplateRef2 * @return OrchestrationConfigGetResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -332,7 +333,8 @@ public byte[] exportOrchestrationConfig(@Nonnull final UUID orchestrationConfigI public OrchestrationConfigGetResponse getOrchestrationConfigByUuid( @Nonnull final UUID orchestrationConfigId, @Nullable final String aiResourceGroup, - @Nullable final Boolean resolveTemplateRef) + @Nullable final Boolean resolveTemplateRef, + @Nullable final Boolean resolveTemplateRef2) throws OpenApiRequestException { final Object localVarPostBody = null; @@ -358,6 +360,8 @@ public OrchestrationConfigGetResponse getOrchestrationConfigByUuid( localVarQueryParams.putAll( apiClient.parameterToMultiValueMap(null, "resolve_template_ref", resolveTemplateRef)); + localVarQueryParams.putAll( + apiClient.parameterToMultiValueMap(null, "resolveTemplateRef", resolveTemplateRef2)); if (aiResourceGroup != null) localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup)); @@ -402,7 +406,7 @@ public OrchestrationConfigGetResponse getOrchestrationConfigByUuid( @Nonnull public OrchestrationConfigGetResponse getOrchestrationConfigByUuid( @Nonnull final UUID orchestrationConfigId) throws OpenApiRequestException { - return getOrchestrationConfigByUuid(orchestrationConfigId, null, null); + return getOrchestrationConfigByUuid(orchestrationConfigId, null, null, null); } /** @@ -497,9 +501,11 @@ public OrchestrationConfigPostResponse importOrchestrationConfig() * @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 includeSpec (optional, default to false) The value for the parameter includeSpec - * @param resolveTemplateRef (optional, default to false) The value for the parameter - * resolveTemplateRef + * @param includeSpec (optional, default to false) DEPRECATED: Use includeSpec instead + * @param includeSpec2 (optional) The value for the parameter includeSpec2 + * @param resolveTemplateRef (optional, default to false) DEPRECATED: Use resolveTemplateRef + * instead + * @param resolveTemplateRef2 (optional) The value for the parameter resolveTemplateRef2 * @return OrchestrationConfigListResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -510,7 +516,9 @@ public OrchestrationConfigListResponse listOrchestrationConfigHistory( @Nonnull final String name, @Nullable final String aiResourceGroup, @Nullable final Boolean includeSpec, - @Nullable final Boolean resolveTemplateRef) + @Nullable final Boolean includeSpec2, + @Nullable final Boolean resolveTemplateRef, + @Nullable final Boolean resolveTemplateRef2) throws OpenApiRequestException { final Object localVarPostBody = null; @@ -551,8 +559,12 @@ public OrchestrationConfigListResponse listOrchestrationConfigHistory( localVarQueryParams.putAll( apiClient.parameterToMultiValueMap(null, "include_spec", includeSpec)); + localVarQueryParams.putAll( + apiClient.parameterToMultiValueMap(null, "includeSpec", includeSpec2)); localVarQueryParams.putAll( apiClient.parameterToMultiValueMap(null, "resolve_template_ref", resolveTemplateRef)); + localVarQueryParams.putAll( + apiClient.parameterToMultiValueMap(null, "resolveTemplateRef", resolveTemplateRef2)); if (aiResourceGroup != null) localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup)); @@ -600,7 +612,7 @@ public OrchestrationConfigListResponse listOrchestrationConfigHistory( public OrchestrationConfigListResponse listOrchestrationConfigHistory( @Nonnull final String scenario, @Nonnull final String version, @Nonnull final String name) throws OpenApiRequestException { - return listOrchestrationConfigHistory(scenario, version, name, null, null, null); + return listOrchestrationConfigHistory(scenario, version, name, null, null, null, null, null); } /** @@ -619,9 +631,11 @@ public OrchestrationConfigListResponse listOrchestrationConfigHistory( * @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 resolveTemplateRef (optional, default to false) The value for the parameter - * resolveTemplateRef + * @param includeSpec (optional, default to false) DEPRECATED: Use includeSpec instead + * @param includeSpec2 (optional) The value for the parameter includeSpec2 + * @param resolveTemplateRef (optional, default to false) DEPRECATED: Use resolveTemplateRef + * instead + * @param resolveTemplateRef2 (optional) The value for the parameter resolveTemplateRef2 * @return OrchestrationConfigListResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -633,7 +647,9 @@ public OrchestrationConfigListResponse listOrchestrationConfigs( @Nullable final String version, @Nullable final String retrieve, @Nullable final Boolean includeSpec, - @Nullable final Boolean resolveTemplateRef) + @Nullable final Boolean includeSpec2, + @Nullable final Boolean resolveTemplateRef, + @Nullable final Boolean resolveTemplateRef2) throws OpenApiRequestException { final Object localVarPostBody = null; @@ -652,8 +668,12 @@ public OrchestrationConfigListResponse listOrchestrationConfigs( localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "retrieve", retrieve)); localVarQueryParams.putAll( apiClient.parameterToMultiValueMap(null, "include_spec", includeSpec)); + localVarQueryParams.putAll( + apiClient.parameterToMultiValueMap(null, "includeSpec", includeSpec2)); localVarQueryParams.putAll( apiClient.parameterToMultiValueMap(null, "resolve_template_ref", resolveTemplateRef)); + localVarQueryParams.putAll( + apiClient.parameterToMultiValueMap(null, "resolveTemplateRef", resolveTemplateRef2)); if (aiResourceGroup != null) localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup)); @@ -696,6 +716,6 @@ public OrchestrationConfigListResponse listOrchestrationConfigs( */ @Nonnull public OrchestrationConfigListResponse listOrchestrationConfigs() throws OpenApiRequestException { - return listOrchestrationConfigs(null, null, null, null, null, null, null); + return listOrchestrationConfigs(null, null, null, null, null, null, null, null, null); } } 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 b39598e62..549328c12 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 @@ -516,6 +516,7 @@ public PromptTemplatePostResponse importPromptTemplate() throws OpenApiRequestEx * @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 + * @param includeSpec (optional, default to false) The value for the parameter includeSpec * @return PromptTemplateListResponse * @throws OpenApiRequestException if an error occurs while attempting to invoke the API */ @@ -525,7 +526,8 @@ public PromptTemplateListResponse listPromptTemplateHistory( @Nonnull final String version, @Nonnull final String name, @Nullable final String aiResourceGroup, - @Nullable final String aiResourceGroupScope) + @Nullable final String aiResourceGroupScope, + @Nullable final Boolean includeSpec) throws OpenApiRequestException { final Object localVarPostBody = null; @@ -564,6 +566,9 @@ public PromptTemplateListResponse listPromptTemplateHistory( final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + localVarQueryParams.putAll( + apiClient.parameterToMultiValueMap(null, "includeSpec", includeSpec)); + if (aiResourceGroup != null) localVarHeaderParams.add("AI-Resource-Group", apiClient.parameterToString(aiResourceGroup)); if (aiResourceGroupScope != null) @@ -613,7 +618,7 @@ public PromptTemplateListResponse listPromptTemplateHistory( public PromptTemplateListResponse listPromptTemplateHistory( @Nonnull final String scenario, @Nonnull final String version, @Nonnull final String name) throws OpenApiRequestException { - return listPromptTemplateHistory(scenario, version, name, null, null); + return listPromptTemplateHistory(scenario, version, name, null, null, null); } /** 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 0d609b103..d0ac9d3a3 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 @@ -159,6 +159,66 @@ public static MethodEnum fromValue(@Nonnull final String value) { @JsonProperty("mask_grounding_input") private DPIConfigMaskGroundingInput maskGroundingInput; + /** Type of masking method to be used for file inputs. Required if file inputs are provided. */ + public enum MaskFileInputMethodEnum { + /** The ANONYMIZATION option of this DPIConfig */ + ANONYMIZATION("anonymization"), + + /** The SKIP option of this DPIConfig */ + SKIP("skip"), + + /** The UNKNOWN_DEFAULT_OPEN_API option of this DPIConfig */ + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + MaskFileInputMethodEnum(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 DPIConfig + */ + @JsonCreator + @Nonnull + public static MaskFileInputMethodEnum fromValue(@Nonnull final String value) { + for (MaskFileInputMethodEnum b : MaskFileInputMethodEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + } + + @JsonProperty("mask_file_input_method") + private MaskFileInputMethodEnum maskFileInputMethod; + @JsonAnySetter @JsonAnyGetter private final Map cloudSdkCustomFields = new LinkedHashMap<>(); @@ -352,6 +412,40 @@ public void setMaskGroundingInput( this.maskGroundingInput = maskGroundingInput; } + /** + * Set the maskFileInputMethod of this {@link DPIConfig} instance and return the same instance. + * + * @param maskFileInputMethod Type of masking method to be used for file inputs. Required if file + * inputs are provided. + * @return The same instance of this {@link DPIConfig} class + */ + @Nonnull + public DPIConfig maskFileInputMethod( + @Nullable final MaskFileInputMethodEnum maskFileInputMethod) { + this.maskFileInputMethod = maskFileInputMethod; + return this; + } + + /** + * Type of masking method to be used for file inputs. Required if file inputs are provided. + * + * @return maskFileInputMethod The maskFileInputMethod of this {@link DPIConfig} instance. + */ + @Nonnull + public MaskFileInputMethodEnum getMaskFileInputMethod() { + return maskFileInputMethod; + } + + /** + * Set the maskFileInputMethod of this {@link DPIConfig} instance. + * + * @param maskFileInputMethod Type of masking method to be used for file inputs. Required if file + * inputs are provided. + */ + public void setMaskFileInputMethod(@Nullable final MaskFileInputMethodEnum maskFileInputMethod) { + this.maskFileInputMethod = maskFileInputMethod; + } + /** * Get the names of the unrecognizable properties of the {@link DPIConfig}. * @@ -395,6 +489,7 @@ public Map toMap() { if (entities != null) declaredFields.put("entities", entities); if (allowlist != null) declaredFields.put("allowlist", allowlist); if (maskGroundingInput != null) declaredFields.put("maskGroundingInput", maskGroundingInput); + if (maskFileInputMethod != null) declaredFields.put("maskFileInputMethod", maskFileInputMethod); return declaredFields; } @@ -424,13 +519,20 @@ public boolean equals(@Nullable final java.lang.Object o) { && Objects.equals(this.method, dpIConfig.method) && Objects.equals(this.entities, dpIConfig.entities) && Objects.equals(this.allowlist, dpIConfig.allowlist) - && Objects.equals(this.maskGroundingInput, dpIConfig.maskGroundingInput); + && Objects.equals(this.maskGroundingInput, dpIConfig.maskGroundingInput) + && Objects.equals(this.maskFileInputMethod, dpIConfig.maskFileInputMethod); } @Override public int hashCode() { return Objects.hash( - type, method, entities, allowlist, maskGroundingInput, cloudSdkCustomFields); + type, + method, + entities, + allowlist, + maskGroundingInput, + maskFileInputMethod, + cloudSdkCustomFields); } @Override @@ -443,6 +545,9 @@ public String toString() { sb.append(" entities: ").append(toIndentedString(entities)).append("\n"); sb.append(" allowlist: ").append(toIndentedString(allowlist)).append("\n"); sb.append(" maskGroundingInput: ").append(toIndentedString(maskGroundingInput)).append("\n"); + sb.append(" maskFileInputMethod: ") + .append(toIndentedString(maskFileInputMethod)) + .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/FileContent.java b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FileContent.java new file mode 100644 index 000000000..bab9b78b2 --- /dev/null +++ b/core-services/prompt-registry/src/main/java/com/sap/ai/sdk/prompt/registry/model/FileContent.java @@ -0,0 +1,221 @@ +/* + * 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; + +/** FileContent */ +// CHECKSTYLE:OFF +public class FileContent +// CHECKSTYLE:ON +{ + @JsonProperty("file_data") + private String fileData; + + @JsonProperty("filename") + private String filename; + + @JsonAnySetter @JsonAnyGetter + private final Map cloudSdkCustomFields = new LinkedHashMap<>(); + + /** Default constructor for FileContent. */ + protected FileContent() {} + + /** + * Set the fileData of this {@link FileContent} instance and return the same instance. + * + * @param fileData Base64 encoded file content or file URL + * @return The same instance of this {@link FileContent} class + */ + @Nonnull + public FileContent fileData(@Nonnull final String fileData) { + this.fileData = fileData; + return this; + } + + /** + * Base64 encoded file content or file URL + * + * @return fileData The fileData of this {@link FileContent} instance. + */ + @Nonnull + public String getFileData() { + return fileData; + } + + /** + * Set the fileData of this {@link FileContent} instance. + * + * @param fileData Base64 encoded file content or file URL + */ + public void setFileData(@Nonnull final String fileData) { + this.fileData = fileData; + } + + /** + * Set the filename of this {@link FileContent} instance and return the same instance. + * + * @param filename Name of the file + * @return The same instance of this {@link FileContent} class + */ + @Nonnull + public FileContent filename(@Nullable final String filename) { + this.filename = filename; + return this; + } + + /** + * Name of the file + * + * @return filename The filename of this {@link FileContent} instance. + */ + @Nonnull + public String getFilename() { + return filename; + } + + /** + * Set the filename of this {@link FileContent} instance. + * + * @param filename Name of the file + */ + public void setFilename(@Nullable final String filename) { + this.filename = filename; + } + + /** + * Get the names of the unrecognizable properties of the {@link FileContent}. + * + * @return The set of properties names + */ + @JsonIgnore + @Nonnull + public Set getCustomFieldNames() { + return cloudSdkCustomFields.keySet(); + } + + /** + * Get the value of an unrecognizable property of this {@link FileContent} 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("FileContent has no field with name '" + name + "'."); + } + return cloudSdkCustomFields.get(name); + } + + /** + * Get the value of all properties of this {@link FileContent} instance including unrecognized + * properties. + * + * @return The map of all properties + */ + @JsonIgnore + @Nonnull + public Map toMap() { + final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields); + if (fileData != null) declaredFields.put("fileData", fileData); + if (filename != null) declaredFields.put("filename", filename); + return declaredFields; + } + + /** + * Set an unrecognizable property of this {@link FileContent} 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 FileContent fileContent = (FileContent) o; + return Objects.equals(this.cloudSdkCustomFields, fileContent.cloudSdkCustomFields) + && Objects.equals(this.fileData, fileContent.fileData) + && Objects.equals(this.filename, fileContent.filename); + } + + @Override + public int hashCode() { + return Objects.hash(fileData, filename, cloudSdkCustomFields); + } + + @Override + @Nonnull + public String toString() { + final StringBuilder sb = new StringBuilder(); + sb.append("class FileContent {\n"); + sb.append(" fileData: ").append(toIndentedString(fileData)).append("\n"); + sb.append(" filename: ").append(toIndentedString(filename)).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 FileContent} instance + * with all required arguments. + */ + public static Builder create() { + return (fileData) -> new FileContent().fileData(fileData); + } + + /** Builder helper class. */ + public interface Builder { + /** + * Set the fileData of this {@link FileContent} instance. + * + * @param fileData Base64 encoded file content or file URL + * @return The FileContent instance. + */ + FileContent fileData(@Nonnull final String fileData); + } +} 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 0890aa675..b82526c28 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 @@ -38,6 +38,9 @@ public enum TypeEnum { /** The IMAGE_URL option of this UserChatMessageContentItem */ IMAGE_URL("image_url"), + /** The FILE option of this UserChatMessageContentItem */ + FILE("file"), + /** The UNKNOWN_DEFAULT_OPEN_API option of this UserChatMessageContentItem */ UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); @@ -96,6 +99,9 @@ public static TypeEnum fromValue(@Nonnull final String value) { @JsonProperty("image_url") private ImageContentUrl imageUrl; + @JsonProperty("file") + private FileContent _file; + @JsonAnySetter @JsonAnyGetter private final Map cloudSdkCustomFields = new LinkedHashMap<>(); @@ -196,6 +202,37 @@ public void setImageUrl(@Nullable final ImageContentUrl imageUrl) { this.imageUrl = imageUrl; } + /** + * Set the _file of this {@link UserChatMessageContentItem} instance and return the same instance. + * + * @param _file The _file of this {@link UserChatMessageContentItem} + * @return The same instance of this {@link UserChatMessageContentItem} class + */ + @Nonnull + public UserChatMessageContentItem _file(@Nullable final FileContent _file) { + this._file = _file; + return this; + } + + /** + * Get _file + * + * @return _file The _file of this {@link UserChatMessageContentItem} instance. + */ + @Nonnull + public FileContent getFile() { + return _file; + } + + /** + * Set the _file of this {@link UserChatMessageContentItem} instance. + * + * @param _file The _file of this {@link UserChatMessageContentItem} + */ + public void setFile(@Nullable final FileContent _file) { + this._file = _file; + } + /** * Get the names of the unrecognizable properties of the {@link UserChatMessageContentItem}. * @@ -239,6 +276,7 @@ public Map toMap() { if (type != null) declaredFields.put("type", type); if (text != null) declaredFields.put("text", text); if (imageUrl != null) declaredFields.put("imageUrl", imageUrl); + if (_file != null) declaredFields.put("_file", _file); return declaredFields; } @@ -267,12 +305,13 @@ public boolean equals(@Nullable final java.lang.Object o) { this.cloudSdkCustomFields, userChatMessageContentItem.cloudSdkCustomFields) && Objects.equals(this.type, userChatMessageContentItem.type) && Objects.equals(this.text, userChatMessageContentItem.text) - && Objects.equals(this.imageUrl, userChatMessageContentItem.imageUrl); + && Objects.equals(this.imageUrl, userChatMessageContentItem.imageUrl) + && Objects.equals(this._file, userChatMessageContentItem._file); } @Override public int hashCode() { - return Objects.hash(type, text, imageUrl, cloudSdkCustomFields); + return Objects.hash(type, text, imageUrl, _file, cloudSdkCustomFields); } @Override @@ -283,6 +322,7 @@ public String toString() { sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" text: ").append(toIndentedString(text)).append("\n"); sb.append(" imageUrl: ").append(toIndentedString(imageUrl)).append("\n"); + sb.append(" _file: ").append(toIndentedString(_file)).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/resources/spec/prompt-registry.yaml b/core-services/prompt-registry/src/main/resources/spec/prompt-registry.yaml index ac7981aef..f12f94189 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 @@ -107,6 +107,11 @@ paths: required: true schema: type: string + - name: includeSpec + in: query + schema: + type: boolean + default: false responses: '200': description: Successful response @@ -381,14 +386,26 @@ paths: - declarative - name: include_spec in: query + deprecated: true + description: 'DEPRECATED: Use includeSpec instead' schema: type: boolean default: false + - name: includeSpec + in: query + schema: + type: boolean - name: resolve_template_ref in: query + deprecated: true + description: 'DEPRECATED: Use resolveTemplateRef instead' schema: type: boolean default: false + - name: resolveTemplateRef + in: query + schema: + type: boolean responses: '200': description: Successful response @@ -428,14 +445,26 @@ paths: type: string - name: include_spec in: query + deprecated: true + description: 'DEPRECATED: Use includeSpec instead' schema: type: boolean default: false + - name: includeSpec + in: query + schema: + type: boolean - name: resolve_template_ref in: query + deprecated: true + description: 'DEPRECATED: Use resolveTemplateRef instead' schema: type: boolean default: false + - name: resolveTemplateRef + in: query + schema: + type: boolean responses: '200': description: Successful response @@ -466,9 +495,15 @@ paths: format: uuid - name: resolve_template_ref in: query + deprecated: true + description: 'DEPRECATED: Use resolveTemplateRef instead' schema: type: boolean default: false + - name: resolveTemplateRef + in: query + schema: + type: boolean responses: '200': description: Successful response @@ -1047,6 +1082,18 @@ components: detail: type: string default: auto + FileContent: + type: object + required: + - file_data + additionalProperties: false + properties: + file_data: + type: string + description: Base64 encoded file content or file URL + filename: + type: string + description: Name of the file UserChatMessageContentItem: type: object additionalProperties: false @@ -1056,10 +1103,13 @@ components: enum: - text - image_url + - file text: type: string image_url: $ref: '#/components/schemas/ImageContentUrl' + file: + $ref: '#/components/schemas/FileContent' required: - type UserChatMessageContent: @@ -1625,6 +1675,12 @@ components: type: boolean default: false description: controls whether the input to the grounding module will be masked with the configuration supplied in the masking module + mask_file_input_method: + description: Type of masking method to be used for file inputs. Required if file inputs are provided. + type: string + enum: + - anonymization + - skip MaskingProviderConfig: oneOf: - $ref: '#/components/schemas/DPIConfig' diff --git a/docs/release_notes.md b/docs/release_notes.md index 6effc3ae7..e7091554c 100644 --- a/docs/release_notes.md +++ b/docs/release_notes.md @@ -8,6 +8,10 @@ ### 🔧 Compatibility Notes +- Some changes to existing generated API in the _Prompt Registry_ module. +- Changes to existing generated API in the _Prompt Registry_ module. + Generated methods now take additional (nullable) arguments. + See full changelog for all details. - Minor changes to generated API of _SAP Grounding Service_. ```diff var chunkMeta;