diff --git a/docs/release_notes.md b/docs/release_notes.md
index 10d109839..24c0576ec 100644
--- a/docs/release_notes.md
+++ b/docs/release_notes.md
@@ -18,10 +18,11 @@
Interfaces with only one implementation were reduced.
As a result, the accessors for fields `OrchestrationModuleConfig.inputTranslationConfig` and `OrchestrationModuleConfig.outputTranslationConfig` now handle the implementing class explicitly.
The same applies to helper methods `DpiMasking#createConfig()` and `MaskingProvider#createConfig()`.
+- [Orchestration] The method `createConfig()` is removed from `ContentFilter`, `AzureContentFilter` and `LlamaGuardFilter` and is replaced by `createInputFilterConfig()` and `createOutputFilterConfig()`.
### ✨ New Functionality
--
+- [Orchestration] Added `AzureContentFilter#promptShield()` available for input filtering.
### 📈 Improvements
diff --git a/orchestration/pom.xml b/orchestration/pom.xml
index 5424fb30d..69ae93798 100644
--- a/orchestration/pom.xml
+++ b/orchestration/pom.xml
@@ -31,10 +31,10 @@
${project.basedir}/../
- 84%
+ 82%
94%
95%
- 79%
+ 77%
93%
100%
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/AzureContentFilter.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/AzureContentFilter.java
index ecbbc3a4b..248ae082a 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/AzureContentFilter.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/AzureContentFilter.java
@@ -1,7 +1,9 @@
package com.sap.ai.sdk.orchestration;
-import com.sap.ai.sdk.orchestration.model.AzureContentSafety;
-import com.sap.ai.sdk.orchestration.model.AzureContentSafetyFilterConfig;
+import com.sap.ai.sdk.orchestration.model.AzureContentSafetyInput;
+import com.sap.ai.sdk.orchestration.model.AzureContentSafetyInputFilterConfig;
+import com.sap.ai.sdk.orchestration.model.AzureContentSafetyOutput;
+import com.sap.ai.sdk.orchestration.model.AzureContentSafetyOutputFilterConfig;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import lombok.NoArgsConstructor;
@@ -46,24 +48,52 @@ public class AzureContentFilter implements ContentFilter {
/* The filter category for violence content. */
@Nullable AzureFilterThreshold violence;
+ /* A flag to set prompt shield on input filer.*/
+ @Nullable Boolean promptShield;
+
+ /**
+ * Converts {@link AzureContentFilter} to its serializable counterpart {@link
+ * AzureContentSafetyInputFilterConfig}.
+ *
+ * @return the corresponding {@link AzureContentSafetyInputFilterConfig} object.
+ * @throws IllegalArgumentException if no policies are set.
+ */
+ @Override
+ @Nonnull
+ public AzureContentSafetyInputFilterConfig createInputFilterConfig() {
+ if (hate == null && selfHarm == null && sexual == null && violence == null) {
+ throw new IllegalArgumentException("At least one filter category must be set");
+ }
+
+ return AzureContentSafetyInputFilterConfig.create()
+ .type(AzureContentSafetyInputFilterConfig.TypeEnum.AZURE_CONTENT_SAFETY)
+ .config(
+ AzureContentSafetyInput.create()
+ .hate(hate != null ? hate.getAzureThreshold() : null)
+ .selfHarm(selfHarm != null ? selfHarm.getAzureThreshold() : null)
+ .sexual(sexual != null ? sexual.getAzureThreshold() : null)
+ .violence(violence != null ? violence.getAzureThreshold() : null)
+ .promptShield(promptShield != null ? promptShield : null));
+ }
+
/**
- * Converts {@code AzureContentFilter} to its serializable counterpart {@link
- * AzureContentSafetyFilterConfig}.
+ * Converts {@link AzureContentFilter} to its serializable counterpart {@link
+ * AzureContentSafetyOutput}.
*
- * @return the corresponding {@code AzureContentSafetyFilterConfig} object.
+ * @return the corresponding {@link AzureContentSafetyOutputFilterConfig} object.
* @throws IllegalArgumentException if no policies are set.
*/
@Override
@Nonnull
- public AzureContentSafetyFilterConfig createConfig() {
+ public AzureContentSafetyOutputFilterConfig createOutputFilterConfig() {
if (hate == null && selfHarm == null && sexual == null && violence == null) {
throw new IllegalArgumentException("At least one filter category must be set");
}
- return AzureContentSafetyFilterConfig.create()
- .type(AzureContentSafetyFilterConfig.TypeEnum.AZURE_CONTENT_SAFETY)
+ return AzureContentSafetyOutputFilterConfig.create()
+ .type(AzureContentSafetyOutputFilterConfig.TypeEnum.AZURE_CONTENT_SAFETY)
.config(
- AzureContentSafety.create()
+ AzureContentSafetyOutput.create()
.hate(hate != null ? hate.getAzureThreshold() : null)
.selfHarm(selfHarm != null ? selfHarm.getAzureThreshold() : null)
.sexual(sexual != null ? sexual.getAzureThreshold() : null)
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/ContentFilter.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/ContentFilter.java
index f0b2003c6..3eccea64a 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/ContentFilter.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/ContentFilter.java
@@ -1,6 +1,7 @@
package com.sap.ai.sdk.orchestration;
-import com.sap.ai.sdk.orchestration.model.FilterConfig;
+import com.sap.ai.sdk.orchestration.model.InputFilterConfig;
+import com.sap.ai.sdk.orchestration.model.OutputFilterConfig;
import javax.annotation.Nonnull;
/**
@@ -17,11 +18,20 @@
public interface ContentFilter {
/**
- * A method that produces the serializable equivalent {@link FilterConfig} object from data
+ * A method that produces the serializable equivalent {@link InputFilterConfig} object from data
* encapsulated in the {@link ContentFilter} object.
*
- * @return the corresponding {@code FilterConfig} object.
+ * @return the corresponding {@link InputFilterConfig} object.
*/
@Nonnull
- FilterConfig createConfig();
+ InputFilterConfig createInputFilterConfig();
+
+ /**
+ * A method that produces the serializable equivalent {@link OutputFilterConfig} object from data
+ * encapsulated in the {@link ContentFilter} object.
+ *
+ * @return the corresponding {@link OutputFilterConfig} object.
+ */
+ @Nonnull
+ OutputFilterConfig createOutputFilterConfig();
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/JacksonMixins.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/JacksonMixins.java
index 73ec77f36..5e43c5a1b 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/JacksonMixins.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/JacksonMixins.java
@@ -3,7 +3,7 @@
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.sap.ai.sdk.orchestration.model.LLMModuleResultSynchronous;
+import com.sap.ai.sdk.orchestration.model.LLMModuleResult;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
@@ -11,7 +11,7 @@
final class JacksonMixins {
/** Mixin to enforce a specific subtype to be deserialized always. */
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
- @JsonDeserialize(as = LLMModuleResultSynchronous.class)
+ @JsonDeserialize(as = LLMModuleResult.class)
interface LLMModuleResultMixIn {}
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/LlamaGuardFilter.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/LlamaGuardFilter.java
index b8fa121e6..2d41a321a 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/LlamaGuardFilter.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/LlamaGuardFilter.java
@@ -40,7 +40,13 @@ public class LlamaGuardFilter implements ContentFilter {
@Nonnull
@Override
- public LlamaGuard38bFilterConfig createConfig() {
+ public LlamaGuard38bFilterConfig createInputFilterConfig() {
return LlamaGuard38bFilterConfig.create().type(LLAMA_GUARD_3_8B).config(config);
}
+
+ @Nonnull
+ @Override
+ public LlamaGuard38bFilterConfig createOutputFilterConfig() {
+ return createInputFilterConfig();
+ }
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationChatResponse.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationChatResponse.java
index 1ea0d40b4..908fecedd 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationChatResponse.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationChatResponse.java
@@ -5,8 +5,8 @@
import com.sap.ai.sdk.orchestration.model.AssistantChatMessage;
import com.sap.ai.sdk.orchestration.model.ChatMessage;
import com.sap.ai.sdk.orchestration.model.ChatMessageContent;
-import com.sap.ai.sdk.orchestration.model.CompletionPostResponseSynchronous;
-import com.sap.ai.sdk.orchestration.model.LLMChoiceSynchronous;
+import com.sap.ai.sdk.orchestration.model.CompletionPostResponse;
+import com.sap.ai.sdk.orchestration.model.LLMChoice;
import com.sap.ai.sdk.orchestration.model.SystemChatMessage;
import com.sap.ai.sdk.orchestration.model.TokenUsage;
import com.sap.ai.sdk.orchestration.model.ToolChatMessage;
@@ -22,7 +22,7 @@
@Value
@RequiredArgsConstructor(access = PACKAGE)
public class OrchestrationChatResponse {
- CompletionPostResponseSynchronous originalResponse;
+ CompletionPostResponse originalResponse;
/**
* Get the message content from the output.
@@ -97,10 +97,10 @@ public List getAllMessages() throws IllegalArgumentException {
/**
* Get the LLM response. Useful for accessing the finish reason or further data like logprobs.
*
- * @return The (first, in case of multiple) {@link LLMChoiceSynchronous}.
+ * @return The (first, in case of multiple) {@link LLMChoice}.
*/
@Nonnull
- public LLMChoiceSynchronous getChoice() {
+ public LLMChoice getChoice() {
// We expect choices to be defined and never empty.
return originalResponse.getOrchestrationResult().getChoices().get(0);
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java
index 1b6434a05..b93f67a86 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationClient.java
@@ -9,7 +9,7 @@
import com.google.common.annotations.Beta;
import com.sap.ai.sdk.core.AiCoreService;
import com.sap.ai.sdk.orchestration.model.CompletionPostRequest;
-import com.sap.ai.sdk.orchestration.model.CompletionPostResponseSynchronous;
+import com.sap.ai.sdk.orchestration.model.CompletionPostResponse;
import com.sap.ai.sdk.orchestration.model.EmbeddingsPostRequest;
import com.sap.ai.sdk.orchestration.model.EmbeddingsPostResponse;
import com.sap.ai.sdk.orchestration.model.ModuleConfigs;
@@ -138,9 +138,9 @@ private static void throwOnContentFilter(@Nonnull final OrchestrationChatComplet
* @throws OrchestrationClientException If the request fails.
*/
@Nonnull
- public CompletionPostResponseSynchronous executeRequest(
- @Nonnull final CompletionPostRequest request) throws OrchestrationClientException {
- return executor.execute("/completion", request, CompletionPostResponseSynchronous.class);
+ public CompletionPostResponse executeRequest(@Nonnull final CompletionPostRequest request)
+ throws OrchestrationClientException {
+ return executor.execute("/completion", request, CompletionPostResponse.class);
}
/**
@@ -182,7 +182,7 @@ public OrchestrationChatResponse executeRequestFromJsonModuleConfig(
requestJson.set("orchestration_config", moduleConfigJson);
return new OrchestrationChatResponse(
- executor.execute("/completion", requestJson, CompletionPostResponseSynchronous.class));
+ executor.execute("/completion", requestJson, CompletionPostResponse.class));
}
/**
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationError.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationError.java
index d8d68ce43..4d5956edd 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationError.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationError.java
@@ -3,7 +3,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import com.google.common.annotations.Beta;
import com.sap.ai.sdk.core.common.ClientError;
-import com.sap.ai.sdk.orchestration.model.ErrorResponseSynchronous;
+import com.sap.ai.sdk.orchestration.model.ErrorResponse;
import javax.annotation.Nonnull;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
@@ -18,7 +18,7 @@
@Value
@Beta
public class OrchestrationError implements ClientError {
- ErrorResponseSynchronous originalResponse;
+ ErrorResponse originalResponse;
/**
* Gets the error message from the contained original response.
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationModuleConfig.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationModuleConfig.java
index f2a83f88f..1b8b7ca19 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationModuleConfig.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/OrchestrationModuleConfig.java
@@ -159,7 +159,10 @@ public OrchestrationModuleConfig withInputFiltering(
allFilters.addAll(Arrays.asList(contentFilters));
final var filterConfigs =
- allFilters.stream().filter(Objects::nonNull).map(ContentFilter::createConfig).toList();
+ allFilters.stream()
+ .filter(Objects::nonNull)
+ .map(ContentFilter::createInputFilterConfig)
+ .toList();
final var inputFilter = InputFilteringConfig.create().filters(filterConfigs);
@@ -194,7 +197,10 @@ public OrchestrationModuleConfig withOutputFiltering(
allFilters.addAll(Arrays.asList(contentFilters));
final var filterConfigs =
- allFilters.stream().filter(Objects::nonNull).map(ContentFilter::createConfig).toList();
+ allFilters.stream()
+ .filter(Objects::nonNull)
+ .map(ContentFilter::createOutputFilterConfig)
+ .toList();
final var outputFilter = OutputFilteringConfig.create().filters(filterConfigs);
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyInput.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyInput.java
new file mode 100644
index 000000000..4c4ccd4af
--- /dev/null
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyInput.java
@@ -0,0 +1,320 @@
+/*
+ * Internal Orchestration Service API
+ * Orchestration is an inference service which provides common additional capabilities for business AI scenarios, such as content filtering and data masking. At the core of the service is the LLM module which allows for an easy, harmonized access to the language models of gen AI hub. The service is designed to be modular and extensible, allowing for the addition of new modules in the future. Each module can be configured independently and at runtime, allowing for a high degree of flexibility in the orchestration of AI services.
+ *
+ *
+ *
+ * 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.orchestration.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;
+
+/** Filter configuration for Azure Content Safety */
+// CHECKSTYLE:OFF
+public class AzureContentSafetyInput
+// CHECKSTYLE:ON
+{
+ @JsonProperty("Hate")
+ private AzureThreshold hate;
+
+ @JsonProperty("SelfHarm")
+ private AzureThreshold selfHarm;
+
+ @JsonProperty("Sexual")
+ private AzureThreshold sexual;
+
+ @JsonProperty("Violence")
+ private AzureThreshold violence;
+
+ @JsonProperty("PromptShield")
+ private Boolean promptShield = false;
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for AzureContentSafetyInput. */
+ protected AzureContentSafetyInput() {}
+
+ /**
+ * Set the hate of this {@link AzureContentSafetyInput} instance and return the same instance.
+ *
+ * @param hate The hate of this {@link AzureContentSafetyInput}
+ * @return The same instance of this {@link AzureContentSafetyInput} class
+ */
+ @Nonnull
+ public AzureContentSafetyInput hate(@Nullable final AzureThreshold hate) {
+ this.hate = hate;
+ return this;
+ }
+
+ /**
+ * Get hate
+ *
+ * @return hate The hate of this {@link AzureContentSafetyInput} instance.
+ */
+ @Nonnull
+ public AzureThreshold getHate() {
+ return hate;
+ }
+
+ /**
+ * Set the hate of this {@link AzureContentSafetyInput} instance.
+ *
+ * @param hate The hate of this {@link AzureContentSafetyInput}
+ */
+ public void setHate(@Nullable final AzureThreshold hate) {
+ this.hate = hate;
+ }
+
+ /**
+ * Set the selfHarm of this {@link AzureContentSafetyInput} instance and return the same instance.
+ *
+ * @param selfHarm The selfHarm of this {@link AzureContentSafetyInput}
+ * @return The same instance of this {@link AzureContentSafetyInput} class
+ */
+ @Nonnull
+ public AzureContentSafetyInput selfHarm(@Nullable final AzureThreshold selfHarm) {
+ this.selfHarm = selfHarm;
+ return this;
+ }
+
+ /**
+ * Get selfHarm
+ *
+ * @return selfHarm The selfHarm of this {@link AzureContentSafetyInput} instance.
+ */
+ @Nonnull
+ public AzureThreshold getSelfHarm() {
+ return selfHarm;
+ }
+
+ /**
+ * Set the selfHarm of this {@link AzureContentSafetyInput} instance.
+ *
+ * @param selfHarm The selfHarm of this {@link AzureContentSafetyInput}
+ */
+ public void setSelfHarm(@Nullable final AzureThreshold selfHarm) {
+ this.selfHarm = selfHarm;
+ }
+
+ /**
+ * Set the sexual of this {@link AzureContentSafetyInput} instance and return the same instance.
+ *
+ * @param sexual The sexual of this {@link AzureContentSafetyInput}
+ * @return The same instance of this {@link AzureContentSafetyInput} class
+ */
+ @Nonnull
+ public AzureContentSafetyInput sexual(@Nullable final AzureThreshold sexual) {
+ this.sexual = sexual;
+ return this;
+ }
+
+ /**
+ * Get sexual
+ *
+ * @return sexual The sexual of this {@link AzureContentSafetyInput} instance.
+ */
+ @Nonnull
+ public AzureThreshold getSexual() {
+ return sexual;
+ }
+
+ /**
+ * Set the sexual of this {@link AzureContentSafetyInput} instance.
+ *
+ * @param sexual The sexual of this {@link AzureContentSafetyInput}
+ */
+ public void setSexual(@Nullable final AzureThreshold sexual) {
+ this.sexual = sexual;
+ }
+
+ /**
+ * Set the violence of this {@link AzureContentSafetyInput} instance and return the same instance.
+ *
+ * @param violence The violence of this {@link AzureContentSafetyInput}
+ * @return The same instance of this {@link AzureContentSafetyInput} class
+ */
+ @Nonnull
+ public AzureContentSafetyInput violence(@Nullable final AzureThreshold violence) {
+ this.violence = violence;
+ return this;
+ }
+
+ /**
+ * Get violence
+ *
+ * @return violence The violence of this {@link AzureContentSafetyInput} instance.
+ */
+ @Nonnull
+ public AzureThreshold getViolence() {
+ return violence;
+ }
+
+ /**
+ * Set the violence of this {@link AzureContentSafetyInput} instance.
+ *
+ * @param violence The violence of this {@link AzureContentSafetyInput}
+ */
+ public void setViolence(@Nullable final AzureThreshold violence) {
+ this.violence = violence;
+ }
+
+ /**
+ * Set the promptShield of this {@link AzureContentSafetyInput} instance and return the same
+ * instance.
+ *
+ * @param promptShield A flag to use prompt shield
+ * @return The same instance of this {@link AzureContentSafetyInput} class
+ */
+ @Nonnull
+ public AzureContentSafetyInput promptShield(@Nullable final Boolean promptShield) {
+ this.promptShield = promptShield;
+ return this;
+ }
+
+ /**
+ * A flag to use prompt shield
+ *
+ * @return promptShield The promptShield of this {@link AzureContentSafetyInput} instance.
+ */
+ @Nonnull
+ public Boolean isPromptShield() {
+ return promptShield;
+ }
+
+ /**
+ * Set the promptShield of this {@link AzureContentSafetyInput} instance.
+ *
+ * @param promptShield A flag to use prompt shield
+ */
+ public void setPromptShield(@Nullable final Boolean promptShield) {
+ this.promptShield = promptShield;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link AzureContentSafetyInput}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link AzureContentSafetyInput} 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(
+ "AzureContentSafetyInput has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link AzureContentSafetyInput} instance including
+ * unrecognized properties.
+ *
+ * @return The map of all properties
+ */
+ @JsonIgnore
+ @Nonnull
+ public Map toMap() {
+ final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
+ if (hate != null) declaredFields.put("hate", hate);
+ if (selfHarm != null) declaredFields.put("selfHarm", selfHarm);
+ if (sexual != null) declaredFields.put("sexual", sexual);
+ if (violence != null) declaredFields.put("violence", violence);
+ if (promptShield != null) declaredFields.put("promptShield", promptShield);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link AzureContentSafetyInput} 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 AzureContentSafetyInput azureContentSafetyInput = (AzureContentSafetyInput) o;
+ return Objects.equals(this.cloudSdkCustomFields, azureContentSafetyInput.cloudSdkCustomFields)
+ && Objects.equals(this.hate, azureContentSafetyInput.hate)
+ && Objects.equals(this.selfHarm, azureContentSafetyInput.selfHarm)
+ && Objects.equals(this.sexual, azureContentSafetyInput.sexual)
+ && Objects.equals(this.violence, azureContentSafetyInput.violence)
+ && Objects.equals(this.promptShield, azureContentSafetyInput.promptShield);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(hate, selfHarm, sexual, violence, promptShield, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class AzureContentSafetyInput {\n");
+ sb.append(" hate: ").append(toIndentedString(hate)).append("\n");
+ sb.append(" selfHarm: ").append(toIndentedString(selfHarm)).append("\n");
+ sb.append(" sexual: ").append(toIndentedString(sexual)).append("\n");
+ sb.append(" violence: ").append(toIndentedString(violence)).append("\n");
+ sb.append(" promptShield: ").append(toIndentedString(promptShield)).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 AzureContentSafetyInput} instance. No arguments are required. */
+ public static AzureContentSafetyInput create() {
+ return new AzureContentSafetyInput();
+ }
+}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyFilterConfig.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyInputFilterConfig.java
similarity index 71%
rename from orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyFilterConfig.java
rename to orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyInputFilterConfig.java
index 1ee8e13fd..3de44c4d5 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyFilterConfig.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyInputFilterConfig.java
@@ -25,17 +25,17 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-/** AzureContentSafetyFilterConfig */
+/** AzureContentSafetyInputFilterConfig */
// CHECKSTYLE:OFF
-public class AzureContentSafetyFilterConfig implements FilterConfig
+public class AzureContentSafetyInputFilterConfig implements InputFilterConfig
// CHECKSTYLE:ON
{
/** Name of the filter provider type */
public enum TypeEnum {
- /** The AZURE_CONTENT_SAFETY option of this AzureContentSafetyFilterConfig */
+ /** The AZURE_CONTENT_SAFETY option of this AzureContentSafetyInputFilterConfig */
AZURE_CONTENT_SAFETY("azure_content_safety"),
- /** The UNKNOWN_DEFAULT_OPEN_API option of this AzureContentSafetyFilterConfig */
+ /** The UNKNOWN_DEFAULT_OPEN_API option of this AzureContentSafetyInputFilterConfig */
UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
private String value;
@@ -70,7 +70,7 @@ public String toString() {
* Get the enum value from a String value
*
* @param value The String value
- * @return The enum value of type AzureContentSafetyFilterConfig
+ * @return The enum value of type AzureContentSafetyInputFilterConfig
*/
@JsonCreator
@Nonnull
@@ -88,23 +88,23 @@ public static TypeEnum fromValue(@Nonnull final String value) {
private TypeEnum type;
@JsonProperty("config")
- private AzureContentSafety config;
+ private AzureContentSafetyInput config;
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
- /** Default constructor for AzureContentSafetyFilterConfig. */
- protected AzureContentSafetyFilterConfig() {}
+ /** Default constructor for AzureContentSafetyInputFilterConfig. */
+ protected AzureContentSafetyInputFilterConfig() {}
/**
- * Set the type of this {@link AzureContentSafetyFilterConfig} instance and return the same
+ * Set the type of this {@link AzureContentSafetyInputFilterConfig} instance and return the same
* instance.
*
* @param type Name of the filter provider type
- * @return The same instance of this {@link AzureContentSafetyFilterConfig} class
+ * @return The same instance of this {@link AzureContentSafetyInputFilterConfig} class
*/
@Nonnull
- public AzureContentSafetyFilterConfig type(@Nonnull final TypeEnum type) {
+ public AzureContentSafetyInputFilterConfig type(@Nonnull final TypeEnum type) {
this.type = type;
return this;
}
@@ -112,7 +112,7 @@ public AzureContentSafetyFilterConfig type(@Nonnull final TypeEnum type) {
/**
* Name of the filter provider type
*
- * @return type The type of this {@link AzureContentSafetyFilterConfig} instance.
+ * @return type The type of this {@link AzureContentSafetyInputFilterConfig} instance.
*/
@Nonnull
public TypeEnum getType() {
@@ -120,7 +120,7 @@ public TypeEnum getType() {
}
/**
- * Set the type of this {@link AzureContentSafetyFilterConfig} instance.
+ * Set the type of this {@link AzureContentSafetyInputFilterConfig} instance.
*
* @param type Name of the filter provider type
*/
@@ -129,14 +129,15 @@ public void setType(@Nonnull final TypeEnum type) {
}
/**
- * Set the config of this {@link AzureContentSafetyFilterConfig} instance and return the same
+ * Set the config of this {@link AzureContentSafetyInputFilterConfig} instance and return the same
* instance.
*
- * @param config The config of this {@link AzureContentSafetyFilterConfig}
- * @return The same instance of this {@link AzureContentSafetyFilterConfig} class
+ * @param config The config of this {@link AzureContentSafetyInputFilterConfig}
+ * @return The same instance of this {@link AzureContentSafetyInputFilterConfig} class
*/
@Nonnull
- public AzureContentSafetyFilterConfig config(@Nullable final AzureContentSafety config) {
+ public AzureContentSafetyInputFilterConfig config(
+ @Nullable final AzureContentSafetyInput config) {
this.config = config;
return this;
}
@@ -144,24 +145,25 @@ public AzureContentSafetyFilterConfig config(@Nullable final AzureContentSafety
/**
* Get config
*
- * @return config The config of this {@link AzureContentSafetyFilterConfig} instance.
+ * @return config The config of this {@link AzureContentSafetyInputFilterConfig} instance.
*/
@Nonnull
- public AzureContentSafety getConfig() {
+ public AzureContentSafetyInput getConfig() {
return config;
}
/**
- * Set the config of this {@link AzureContentSafetyFilterConfig} instance.
+ * Set the config of this {@link AzureContentSafetyInputFilterConfig} instance.
*
- * @param config The config of this {@link AzureContentSafetyFilterConfig}
+ * @param config The config of this {@link AzureContentSafetyInputFilterConfig}
*/
- public void setConfig(@Nullable final AzureContentSafety config) {
+ public void setConfig(@Nullable final AzureContentSafetyInput config) {
this.config = config;
}
/**
- * Get the names of the unrecognizable properties of the {@link AzureContentSafetyFilterConfig}.
+ * Get the names of the unrecognizable properties of the {@link
+ * AzureContentSafetyInputFilterConfig}.
*
* @return The set of properties names
*/
@@ -172,7 +174,7 @@ public Set getCustomFieldNames() {
}
/**
- * Get the value of an unrecognizable property of this {@link AzureContentSafetyFilterConfig}
+ * Get the value of an unrecognizable property of this {@link AzureContentSafetyInputFilterConfig}
* instance.
*
* @deprecated Use {@link #toMap()} instead.
@@ -185,13 +187,13 @@ public Set getCustomFieldNames() {
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
if (!cloudSdkCustomFields.containsKey(name)) {
throw new NoSuchElementException(
- "AzureContentSafetyFilterConfig has no field with name '" + name + "'.");
+ "AzureContentSafetyInputFilterConfig has no field with name '" + name + "'.");
}
return cloudSdkCustomFields.get(name);
}
/**
- * Get the value of all properties of this {@link AzureContentSafetyFilterConfig} instance
+ * Get the value of all properties of this {@link AzureContentSafetyInputFilterConfig} instance
* including unrecognized properties.
*
* @return The map of all properties
@@ -206,8 +208,8 @@ public Map toMap() {
}
/**
- * Set an unrecognizable property of this {@link AzureContentSafetyFilterConfig} instance. If the
- * map previously contained a mapping for the key, the old value is replaced by the specified
+ * Set an unrecognizable property of this {@link AzureContentSafetyInputFilterConfig} 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
@@ -226,12 +228,12 @@ public boolean equals(@Nullable final java.lang.Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- final AzureContentSafetyFilterConfig azureContentSafetyFilterConfig =
- (AzureContentSafetyFilterConfig) o;
+ final AzureContentSafetyInputFilterConfig azureContentSafetyInputFilterConfig =
+ (AzureContentSafetyInputFilterConfig) o;
return Objects.equals(
- this.cloudSdkCustomFields, azureContentSafetyFilterConfig.cloudSdkCustomFields)
- && Objects.equals(this.type, azureContentSafetyFilterConfig.type)
- && Objects.equals(this.config, azureContentSafetyFilterConfig.config);
+ this.cloudSdkCustomFields, azureContentSafetyInputFilterConfig.cloudSdkCustomFields)
+ && Objects.equals(this.type, azureContentSafetyInputFilterConfig.type)
+ && Objects.equals(this.config, azureContentSafetyInputFilterConfig.config);
}
@Override
@@ -243,7 +245,7 @@ public int hashCode() {
@Nonnull
public String toString() {
final StringBuilder sb = new StringBuilder();
- sb.append("class AzureContentSafetyFilterConfig {\n");
+ sb.append("class AzureContentSafetyInputFilterConfig {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" config: ").append(toIndentedString(config)).append("\n");
cloudSdkCustomFields.forEach(
@@ -265,20 +267,20 @@ private String toIndentedString(final java.lang.Object o) {
/**
* Create a type-safe, fluent-api builder object to construct a new {@link
- * AzureContentSafetyFilterConfig} instance with all required arguments.
+ * AzureContentSafetyInputFilterConfig} instance with all required arguments.
*/
public static Builder create() {
- return (type) -> new AzureContentSafetyFilterConfig().type(type);
+ return (type) -> new AzureContentSafetyInputFilterConfig().type(type);
}
/** Builder helper class. */
public interface Builder {
/**
- * Set the type of this {@link AzureContentSafetyFilterConfig} instance.
+ * Set the type of this {@link AzureContentSafetyInputFilterConfig} instance.
*
* @param type Name of the filter provider type
- * @return The AzureContentSafetyFilterConfig instance.
+ * @return The AzureContentSafetyInputFilterConfig instance.
*/
- AzureContentSafetyFilterConfig type(@Nonnull final TypeEnum type);
+ AzureContentSafetyInputFilterConfig type(@Nonnull final TypeEnum type);
}
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafety.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyOutput.java
similarity index 72%
rename from orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafety.java
rename to orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyOutput.java
index dcece0626..f428f183a 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafety.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyOutput.java
@@ -25,7 +25,7 @@
/** Filter configuration for Azure Content Safety */
// CHECKSTYLE:OFF
-public class AzureContentSafety
+public class AzureContentSafetyOutput
// CHECKSTYLE:ON
{
@JsonProperty("Hate")
@@ -43,17 +43,17 @@ public class AzureContentSafety
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
- /** Default constructor for AzureContentSafety. */
- protected AzureContentSafety() {}
+ /** Default constructor for AzureContentSafetyOutput. */
+ protected AzureContentSafetyOutput() {}
/**
- * Set the hate of this {@link AzureContentSafety} instance and return the same instance.
+ * Set the hate of this {@link AzureContentSafetyOutput} instance and return the same instance.
*
- * @param hate The hate of this {@link AzureContentSafety}
- * @return The same instance of this {@link AzureContentSafety} class
+ * @param hate The hate of this {@link AzureContentSafetyOutput}
+ * @return The same instance of this {@link AzureContentSafetyOutput} class
*/
@Nonnull
- public AzureContentSafety hate(@Nullable final AzureThreshold hate) {
+ public AzureContentSafetyOutput hate(@Nullable final AzureThreshold hate) {
this.hate = hate;
return this;
}
@@ -61,7 +61,7 @@ public AzureContentSafety hate(@Nullable final AzureThreshold hate) {
/**
* Get hate
*
- * @return hate The hate of this {@link AzureContentSafety} instance.
+ * @return hate The hate of this {@link AzureContentSafetyOutput} instance.
*/
@Nonnull
public AzureThreshold getHate() {
@@ -69,22 +69,23 @@ public AzureThreshold getHate() {
}
/**
- * Set the hate of this {@link AzureContentSafety} instance.
+ * Set the hate of this {@link AzureContentSafetyOutput} instance.
*
- * @param hate The hate of this {@link AzureContentSafety}
+ * @param hate The hate of this {@link AzureContentSafetyOutput}
*/
public void setHate(@Nullable final AzureThreshold hate) {
this.hate = hate;
}
/**
- * Set the selfHarm of this {@link AzureContentSafety} instance and return the same instance.
+ * Set the selfHarm of this {@link AzureContentSafetyOutput} instance and return the same
+ * instance.
*
- * @param selfHarm The selfHarm of this {@link AzureContentSafety}
- * @return The same instance of this {@link AzureContentSafety} class
+ * @param selfHarm The selfHarm of this {@link AzureContentSafetyOutput}
+ * @return The same instance of this {@link AzureContentSafetyOutput} class
*/
@Nonnull
- public AzureContentSafety selfHarm(@Nullable final AzureThreshold selfHarm) {
+ public AzureContentSafetyOutput selfHarm(@Nullable final AzureThreshold selfHarm) {
this.selfHarm = selfHarm;
return this;
}
@@ -92,7 +93,7 @@ public AzureContentSafety selfHarm(@Nullable final AzureThreshold selfHarm) {
/**
* Get selfHarm
*
- * @return selfHarm The selfHarm of this {@link AzureContentSafety} instance.
+ * @return selfHarm The selfHarm of this {@link AzureContentSafetyOutput} instance.
*/
@Nonnull
public AzureThreshold getSelfHarm() {
@@ -100,22 +101,22 @@ public AzureThreshold getSelfHarm() {
}
/**
- * Set the selfHarm of this {@link AzureContentSafety} instance.
+ * Set the selfHarm of this {@link AzureContentSafetyOutput} instance.
*
- * @param selfHarm The selfHarm of this {@link AzureContentSafety}
+ * @param selfHarm The selfHarm of this {@link AzureContentSafetyOutput}
*/
public void setSelfHarm(@Nullable final AzureThreshold selfHarm) {
this.selfHarm = selfHarm;
}
/**
- * Set the sexual of this {@link AzureContentSafety} instance and return the same instance.
+ * Set the sexual of this {@link AzureContentSafetyOutput} instance and return the same instance.
*
- * @param sexual The sexual of this {@link AzureContentSafety}
- * @return The same instance of this {@link AzureContentSafety} class
+ * @param sexual The sexual of this {@link AzureContentSafetyOutput}
+ * @return The same instance of this {@link AzureContentSafetyOutput} class
*/
@Nonnull
- public AzureContentSafety sexual(@Nullable final AzureThreshold sexual) {
+ public AzureContentSafetyOutput sexual(@Nullable final AzureThreshold sexual) {
this.sexual = sexual;
return this;
}
@@ -123,7 +124,7 @@ public AzureContentSafety sexual(@Nullable final AzureThreshold sexual) {
/**
* Get sexual
*
- * @return sexual The sexual of this {@link AzureContentSafety} instance.
+ * @return sexual The sexual of this {@link AzureContentSafetyOutput} instance.
*/
@Nonnull
public AzureThreshold getSexual() {
@@ -131,22 +132,23 @@ public AzureThreshold getSexual() {
}
/**
- * Set the sexual of this {@link AzureContentSafety} instance.
+ * Set the sexual of this {@link AzureContentSafetyOutput} instance.
*
- * @param sexual The sexual of this {@link AzureContentSafety}
+ * @param sexual The sexual of this {@link AzureContentSafetyOutput}
*/
public void setSexual(@Nullable final AzureThreshold sexual) {
this.sexual = sexual;
}
/**
- * Set the violence of this {@link AzureContentSafety} instance and return the same instance.
+ * Set the violence of this {@link AzureContentSafetyOutput} instance and return the same
+ * instance.
*
- * @param violence The violence of this {@link AzureContentSafety}
- * @return The same instance of this {@link AzureContentSafety} class
+ * @param violence The violence of this {@link AzureContentSafetyOutput}
+ * @return The same instance of this {@link AzureContentSafetyOutput} class
*/
@Nonnull
- public AzureContentSafety violence(@Nullable final AzureThreshold violence) {
+ public AzureContentSafetyOutput violence(@Nullable final AzureThreshold violence) {
this.violence = violence;
return this;
}
@@ -154,7 +156,7 @@ public AzureContentSafety violence(@Nullable final AzureThreshold violence) {
/**
* Get violence
*
- * @return violence The violence of this {@link AzureContentSafety} instance.
+ * @return violence The violence of this {@link AzureContentSafetyOutput} instance.
*/
@Nonnull
public AzureThreshold getViolence() {
@@ -162,16 +164,16 @@ public AzureThreshold getViolence() {
}
/**
- * Set the violence of this {@link AzureContentSafety} instance.
+ * Set the violence of this {@link AzureContentSafetyOutput} instance.
*
- * @param violence The violence of this {@link AzureContentSafety}
+ * @param violence The violence of this {@link AzureContentSafetyOutput}
*/
public void setViolence(@Nullable final AzureThreshold violence) {
this.violence = violence;
}
/**
- * Get the names of the unrecognizable properties of the {@link AzureContentSafety}.
+ * Get the names of the unrecognizable properties of the {@link AzureContentSafetyOutput}.
*
* @return The set of properties names
*/
@@ -182,7 +184,7 @@ public Set getCustomFieldNames() {
}
/**
- * Get the value of an unrecognizable property of this {@link AzureContentSafety} instance.
+ * Get the value of an unrecognizable property of this {@link AzureContentSafetyOutput} instance.
*
* @deprecated Use {@link #toMap()} instead.
* @param name The name of the property
@@ -193,13 +195,14 @@ public Set getCustomFieldNames() {
@Deprecated
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
if (!cloudSdkCustomFields.containsKey(name)) {
- throw new NoSuchElementException("AzureContentSafety has no field with name '" + name + "'.");
+ throw new NoSuchElementException(
+ "AzureContentSafetyOutput has no field with name '" + name + "'.");
}
return cloudSdkCustomFields.get(name);
}
/**
- * Get the value of all properties of this {@link AzureContentSafety} instance including
+ * Get the value of all properties of this {@link AzureContentSafetyOutput} instance including
* unrecognized properties.
*
* @return The map of all properties
@@ -216,7 +219,7 @@ public Map toMap() {
}
/**
- * Set an unrecognizable property of this {@link AzureContentSafety} instance. If the map
+ * Set an unrecognizable property of this {@link AzureContentSafetyOutput} 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
@@ -235,12 +238,12 @@ public boolean equals(@Nullable final java.lang.Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- final AzureContentSafety azureContentSafety = (AzureContentSafety) o;
- return Objects.equals(this.cloudSdkCustomFields, azureContentSafety.cloudSdkCustomFields)
- && Objects.equals(this.hate, azureContentSafety.hate)
- && Objects.equals(this.selfHarm, azureContentSafety.selfHarm)
- && Objects.equals(this.sexual, azureContentSafety.sexual)
- && Objects.equals(this.violence, azureContentSafety.violence);
+ final AzureContentSafetyOutput azureContentSafetyOutput = (AzureContentSafetyOutput) o;
+ return Objects.equals(this.cloudSdkCustomFields, azureContentSafetyOutput.cloudSdkCustomFields)
+ && Objects.equals(this.hate, azureContentSafetyOutput.hate)
+ && Objects.equals(this.selfHarm, azureContentSafetyOutput.selfHarm)
+ && Objects.equals(this.sexual, azureContentSafetyOutput.sexual)
+ && Objects.equals(this.violence, azureContentSafetyOutput.violence);
}
@Override
@@ -252,7 +255,7 @@ public int hashCode() {
@Nonnull
public String toString() {
final StringBuilder sb = new StringBuilder();
- sb.append("class AzureContentSafety {\n");
+ sb.append("class AzureContentSafetyOutput {\n");
sb.append(" hate: ").append(toIndentedString(hate)).append("\n");
sb.append(" selfHarm: ").append(toIndentedString(selfHarm)).append("\n");
sb.append(" sexual: ").append(toIndentedString(sexual)).append("\n");
@@ -274,8 +277,8 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
- /** Create a new {@link AzureContentSafety} instance. No arguments are required. */
- public static AzureContentSafety create() {
- return new AzureContentSafety();
+ /** Create a new {@link AzureContentSafetyOutput} instance. No arguments are required. */
+ public static AzureContentSafetyOutput create() {
+ return new AzureContentSafetyOutput();
}
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyOutputFilterConfig.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyOutputFilterConfig.java
new file mode 100644
index 000000000..c083b6c20
--- /dev/null
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyOutputFilterConfig.java
@@ -0,0 +1,286 @@
+/*
+ * Internal Orchestration Service API
+ * Orchestration is an inference service which provides common additional capabilities for business AI scenarios, such as content filtering and data masking. At the core of the service is the LLM module which allows for an easy, harmonized access to the language models of gen AI hub. The service is designed to be modular and extensible, allowing for the addition of new modules in the future. Each module can be configured independently and at runtime, allowing for a high degree of flexibility in the orchestration of AI services.
+ *
+ *
+ *
+ * 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.orchestration.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;
+
+/** AzureContentSafetyOutputFilterConfig */
+// CHECKSTYLE:OFF
+public class AzureContentSafetyOutputFilterConfig implements OutputFilterConfig
+// CHECKSTYLE:ON
+{
+ /** Name of the filter provider type */
+ public enum TypeEnum {
+ /** The AZURE_CONTENT_SAFETY option of this AzureContentSafetyOutputFilterConfig */
+ AZURE_CONTENT_SAFETY("azure_content_safety"),
+
+ /** The UNKNOWN_DEFAULT_OPEN_API option of this AzureContentSafetyOutputFilterConfig */
+ 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 AzureContentSafetyOutputFilterConfig
+ */
+ @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 AzureContentSafetyOutput config;
+
+ @JsonAnySetter @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+
+ /** Default constructor for AzureContentSafetyOutputFilterConfig. */
+ protected AzureContentSafetyOutputFilterConfig() {}
+
+ /**
+ * Set the type of this {@link AzureContentSafetyOutputFilterConfig} instance and return the same
+ * instance.
+ *
+ * @param type Name of the filter provider type
+ * @return The same instance of this {@link AzureContentSafetyOutputFilterConfig} class
+ */
+ @Nonnull
+ public AzureContentSafetyOutputFilterConfig type(@Nonnull final TypeEnum type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Name of the filter provider type
+ *
+ * @return type The type of this {@link AzureContentSafetyOutputFilterConfig} instance.
+ */
+ @Nonnull
+ public TypeEnum getType() {
+ return type;
+ }
+
+ /**
+ * Set the type of this {@link AzureContentSafetyOutputFilterConfig} 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 AzureContentSafetyOutputFilterConfig} instance and return the
+ * same instance.
+ *
+ * @param config The config of this {@link AzureContentSafetyOutputFilterConfig}
+ * @return The same instance of this {@link AzureContentSafetyOutputFilterConfig} class
+ */
+ @Nonnull
+ public AzureContentSafetyOutputFilterConfig config(
+ @Nullable final AzureContentSafetyOutput config) {
+ this.config = config;
+ return this;
+ }
+
+ /**
+ * Get config
+ *
+ * @return config The config of this {@link AzureContentSafetyOutputFilterConfig} instance.
+ */
+ @Nonnull
+ public AzureContentSafetyOutput getConfig() {
+ return config;
+ }
+
+ /**
+ * Set the config of this {@link AzureContentSafetyOutputFilterConfig} instance.
+ *
+ * @param config The config of this {@link AzureContentSafetyOutputFilterConfig}
+ */
+ public void setConfig(@Nullable final AzureContentSafetyOutput config) {
+ this.config = config;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link
+ * AzureContentSafetyOutputFilterConfig}.
+ *
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link
+ * AzureContentSafetyOutputFilterConfig} 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(
+ "AzureContentSafetyOutputFilterConfig has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Get the value of all properties of this {@link AzureContentSafetyOutputFilterConfig} 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);
+ return declaredFields;
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link AzureContentSafetyOutputFilterConfig} 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 AzureContentSafetyOutputFilterConfig azureContentSafetyOutputFilterConfig =
+ (AzureContentSafetyOutputFilterConfig) o;
+ return Objects.equals(
+ this.cloudSdkCustomFields, azureContentSafetyOutputFilterConfig.cloudSdkCustomFields)
+ && Objects.equals(this.type, azureContentSafetyOutputFilterConfig.type)
+ && Objects.equals(this.config, azureContentSafetyOutputFilterConfig.config);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(type, config, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class AzureContentSafetyOutputFilterConfig {\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" config: ").append(toIndentedString(config)).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
+ * AzureContentSafetyOutputFilterConfig} instance with all required arguments.
+ */
+ public static Builder create() {
+ return (type) -> new AzureContentSafetyOutputFilterConfig().type(type);
+ }
+
+ /** Builder helper class. */
+ public interface Builder {
+ /**
+ * Set the type of this {@link AzureContentSafetyOutputFilterConfig} instance.
+ *
+ * @param type Name of the filter provider type
+ * @return The AzureContentSafetyOutputFilterConfig instance.
+ */
+ AzureContentSafetyOutputFilterConfig type(@Nonnull final TypeEnum type);
+ }
+}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/CompletionPostResponseSynchronous.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/CompletionPostResponse.java
similarity index 68%
rename from orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/CompletionPostResponseSynchronous.java
rename to orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/CompletionPostResponse.java
index ef3fd2789..245223966 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/CompletionPostResponseSynchronous.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/CompletionPostResponse.java
@@ -23,35 +23,34 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-/** CompletionPostResponseSynchronous */
+/** CompletionPostResponse */
// CHECKSTYLE:OFF
-public class CompletionPostResponseSynchronous
+public class CompletionPostResponse
// CHECKSTYLE:ON
{
@JsonProperty("request_id")
private String requestId;
@JsonProperty("module_results")
- private ModuleResultsSynchronous moduleResults;
+ private ModuleResults moduleResults;
@JsonProperty("orchestration_result")
- private LLMModuleResultSynchronous orchestrationResult;
+ private LLMModuleResult orchestrationResult;
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
- /** Default constructor for CompletionPostResponseSynchronous. */
- protected CompletionPostResponseSynchronous() {}
+ /** Default constructor for CompletionPostResponse. */
+ protected CompletionPostResponse() {}
/**
- * Set the requestId of this {@link CompletionPostResponseSynchronous} instance and return the
- * same instance.
+ * Set the requestId of this {@link CompletionPostResponse} instance and return the same instance.
*
* @param requestId ID of the request
- * @return The same instance of this {@link CompletionPostResponseSynchronous} class
+ * @return The same instance of this {@link CompletionPostResponse} class
*/
@Nonnull
- public CompletionPostResponseSynchronous requestId(@Nonnull final String requestId) {
+ public CompletionPostResponse requestId(@Nonnull final String requestId) {
this.requestId = requestId;
return this;
}
@@ -59,7 +58,7 @@ public CompletionPostResponseSynchronous requestId(@Nonnull final String request
/**
* ID of the request
*
- * @return requestId The requestId of this {@link CompletionPostResponseSynchronous} instance.
+ * @return requestId The requestId of this {@link CompletionPostResponse} instance.
*/
@Nonnull
public String getRequestId() {
@@ -67,7 +66,7 @@ public String getRequestId() {
}
/**
- * Set the requestId of this {@link CompletionPostResponseSynchronous} instance.
+ * Set the requestId of this {@link CompletionPostResponse} instance.
*
* @param requestId ID of the request
*/
@@ -76,15 +75,14 @@ public void setRequestId(@Nonnull final String requestId) {
}
/**
- * Set the moduleResults of this {@link CompletionPostResponseSynchronous} instance and return the
- * same instance.
+ * Set the moduleResults of this {@link CompletionPostResponse} instance and return the same
+ * instance.
*
- * @param moduleResults The moduleResults of this {@link CompletionPostResponseSynchronous}
- * @return The same instance of this {@link CompletionPostResponseSynchronous} class
+ * @param moduleResults The moduleResults of this {@link CompletionPostResponse}
+ * @return The same instance of this {@link CompletionPostResponse} class
*/
@Nonnull
- public CompletionPostResponseSynchronous moduleResults(
- @Nonnull final ModuleResultsSynchronous moduleResults) {
+ public CompletionPostResponse moduleResults(@Nonnull final ModuleResults moduleResults) {
this.moduleResults = moduleResults;
return this;
}
@@ -92,34 +90,32 @@ public CompletionPostResponseSynchronous moduleResults(
/**
* Get moduleResults
*
- * @return moduleResults The moduleResults of this {@link CompletionPostResponseSynchronous}
- * instance.
+ * @return moduleResults The moduleResults of this {@link CompletionPostResponse} instance.
*/
@Nonnull
- public ModuleResultsSynchronous getModuleResults() {
+ public ModuleResults getModuleResults() {
return moduleResults;
}
/**
- * Set the moduleResults of this {@link CompletionPostResponseSynchronous} instance.
+ * Set the moduleResults of this {@link CompletionPostResponse} instance.
*
- * @param moduleResults The moduleResults of this {@link CompletionPostResponseSynchronous}
+ * @param moduleResults The moduleResults of this {@link CompletionPostResponse}
*/
- public void setModuleResults(@Nonnull final ModuleResultsSynchronous moduleResults) {
+ public void setModuleResults(@Nonnull final ModuleResults moduleResults) {
this.moduleResults = moduleResults;
}
/**
- * Set the orchestrationResult of this {@link CompletionPostResponseSynchronous} instance and
- * return the same instance.
+ * Set the orchestrationResult of this {@link CompletionPostResponse} instance and return the same
+ * instance.
*
- * @param orchestrationResult The orchestrationResult of this {@link
- * CompletionPostResponseSynchronous}
- * @return The same instance of this {@link CompletionPostResponseSynchronous} class
+ * @param orchestrationResult The orchestrationResult of this {@link CompletionPostResponse}
+ * @return The same instance of this {@link CompletionPostResponse} class
*/
@Nonnull
- public CompletionPostResponseSynchronous orchestrationResult(
- @Nonnull final LLMModuleResultSynchronous orchestrationResult) {
+ public CompletionPostResponse orchestrationResult(
+ @Nonnull final LLMModuleResult orchestrationResult) {
this.orchestrationResult = orchestrationResult;
return this;
}
@@ -127,28 +123,25 @@ public CompletionPostResponseSynchronous orchestrationResult(
/**
* Get orchestrationResult
*
- * @return orchestrationResult The orchestrationResult of this {@link
- * CompletionPostResponseSynchronous} instance.
+ * @return orchestrationResult The orchestrationResult of this {@link CompletionPostResponse}
+ * instance.
*/
@Nonnull
- public LLMModuleResultSynchronous getOrchestrationResult() {
+ public LLMModuleResult getOrchestrationResult() {
return orchestrationResult;
}
/**
- * Set the orchestrationResult of this {@link CompletionPostResponseSynchronous} instance.
+ * Set the orchestrationResult of this {@link CompletionPostResponse} instance.
*
- * @param orchestrationResult The orchestrationResult of this {@link
- * CompletionPostResponseSynchronous}
+ * @param orchestrationResult The orchestrationResult of this {@link CompletionPostResponse}
*/
- public void setOrchestrationResult(
- @Nonnull final LLMModuleResultSynchronous orchestrationResult) {
+ public void setOrchestrationResult(@Nonnull final LLMModuleResult orchestrationResult) {
this.orchestrationResult = orchestrationResult;
}
/**
- * Get the names of the unrecognizable properties of the {@link
- * CompletionPostResponseSynchronous}.
+ * Get the names of the unrecognizable properties of the {@link CompletionPostResponse}.
*
* @return The set of properties names
*/
@@ -159,8 +152,7 @@ public Set getCustomFieldNames() {
}
/**
- * Get the value of an unrecognizable property of this {@link CompletionPostResponseSynchronous}
- * instance.
+ * Get the value of an unrecognizable property of this {@link CompletionPostResponse} instance.
*
* @deprecated Use {@link #toMap()} instead.
* @param name The name of the property
@@ -172,14 +164,14 @@ public Set getCustomFieldNames() {
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
if (!cloudSdkCustomFields.containsKey(name)) {
throw new NoSuchElementException(
- "CompletionPostResponseSynchronous has no field with name '" + name + "'.");
+ "CompletionPostResponse has no field with name '" + name + "'.");
}
return cloudSdkCustomFields.get(name);
}
/**
- * Get the value of all properties of this {@link CompletionPostResponseSynchronous} instance
- * including unrecognized properties.
+ * Get the value of all properties of this {@link CompletionPostResponse} instance including
+ * unrecognized properties.
*
* @return The map of all properties
*/
@@ -194,9 +186,8 @@ public Map toMap() {
}
/**
- * Set an unrecognizable property of this {@link CompletionPostResponseSynchronous} instance. If
- * the map previously contained a mapping for the key, the old value is replaced by the specified
- * value.
+ * Set an unrecognizable property of this {@link CompletionPostResponse} 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
@@ -214,14 +205,11 @@ public boolean equals(@Nullable final java.lang.Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- final CompletionPostResponseSynchronous completionPostResponseSynchronous =
- (CompletionPostResponseSynchronous) o;
- return Objects.equals(
- this.cloudSdkCustomFields, completionPostResponseSynchronous.cloudSdkCustomFields)
- && Objects.equals(this.requestId, completionPostResponseSynchronous.requestId)
- && Objects.equals(this.moduleResults, completionPostResponseSynchronous.moduleResults)
- && Objects.equals(
- this.orchestrationResult, completionPostResponseSynchronous.orchestrationResult);
+ final CompletionPostResponse completionPostResponse = (CompletionPostResponse) o;
+ return Objects.equals(this.cloudSdkCustomFields, completionPostResponse.cloudSdkCustomFields)
+ && Objects.equals(this.requestId, completionPostResponse.requestId)
+ && Objects.equals(this.moduleResults, completionPostResponse.moduleResults)
+ && Objects.equals(this.orchestrationResult, completionPostResponse.orchestrationResult);
}
@Override
@@ -233,7 +221,7 @@ public int hashCode() {
@Nonnull
public String toString() {
final StringBuilder sb = new StringBuilder();
- sb.append("class CompletionPostResponseSynchronous {\n");
+ sb.append("class CompletionPostResponse {\n");
sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
sb.append(" moduleResults: ").append(toIndentedString(moduleResults)).append("\n");
sb.append(" orchestrationResult: ")
@@ -257,14 +245,14 @@ private String toIndentedString(final java.lang.Object o) {
}
/**
- * Create a type-safe, fluent-api builder object to construct a new {@link
- * CompletionPostResponseSynchronous} instance with all required arguments.
+ * Create a type-safe, fluent-api builder object to construct a new {@link CompletionPostResponse}
+ * instance with all required arguments.
*/
public static Builder create() {
return (requestId) ->
(moduleResults) ->
(orchestrationResult) ->
- new CompletionPostResponseSynchronous()
+ new CompletionPostResponse()
.requestId(requestId)
.moduleResults(moduleResults)
.orchestrationResult(orchestrationResult);
@@ -273,10 +261,10 @@ public static Builder create() {
/** Builder helper class. */
public interface Builder {
/**
- * Set the requestId of this {@link CompletionPostResponseSynchronous} instance.
+ * Set the requestId of this {@link CompletionPostResponse} instance.
*
* @param requestId ID of the request
- * @return The CompletionPostResponseSynchronous builder.
+ * @return The CompletionPostResponse builder.
*/
Builder1 requestId(@Nonnull final String requestId);
}
@@ -284,24 +272,22 @@ public interface Builder {
/** Builder helper class. */
public interface Builder1 {
/**
- * Set the moduleResults of this {@link CompletionPostResponseSynchronous} instance.
+ * Set the moduleResults of this {@link CompletionPostResponse} instance.
*
- * @param moduleResults The moduleResults of this {@link CompletionPostResponseSynchronous}
- * @return The CompletionPostResponseSynchronous builder.
+ * @param moduleResults The moduleResults of this {@link CompletionPostResponse}
+ * @return The CompletionPostResponse builder.
*/
- Builder2 moduleResults(@Nonnull final ModuleResultsSynchronous moduleResults);
+ Builder2 moduleResults(@Nonnull final ModuleResults moduleResults);
}
/** Builder helper class. */
public interface Builder2 {
/**
- * Set the orchestrationResult of this {@link CompletionPostResponseSynchronous} instance.
+ * Set the orchestrationResult of this {@link CompletionPostResponse} instance.
*
- * @param orchestrationResult The orchestrationResult of this {@link
- * CompletionPostResponseSynchronous}
- * @return The CompletionPostResponseSynchronous instance.
+ * @param orchestrationResult The orchestrationResult of this {@link CompletionPostResponse}
+ * @return The CompletionPostResponse instance.
*/
- CompletionPostResponseSynchronous orchestrationResult(
- @Nonnull final LLMModuleResultSynchronous orchestrationResult);
+ CompletionPostResponse orchestrationResult(@Nonnull final LLMModuleResult orchestrationResult);
}
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsOrchestrationConfig.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsOrchestrationConfig.java
index 622f65162..ca2d26b1d 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsOrchestrationConfig.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsOrchestrationConfig.java
@@ -28,8 +28,8 @@
public class EmbeddingsOrchestrationConfig
// CHECKSTYLE:ON
{
- @JsonProperty("module_configs")
- private EmbeddingsModuleConfigs moduleConfigs;
+ @JsonProperty("modules")
+ private EmbeddingsModuleConfigs modules;
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
@@ -38,36 +38,35 @@ public class EmbeddingsOrchestrationConfig
protected EmbeddingsOrchestrationConfig() {}
/**
- * Set the moduleConfigs of this {@link EmbeddingsOrchestrationConfig} instance and return the
- * same instance.
+ * Set the modules of this {@link EmbeddingsOrchestrationConfig} instance and return the same
+ * instance.
*
- * @param moduleConfigs The moduleConfigs of this {@link EmbeddingsOrchestrationConfig}
+ * @param modules The modules of this {@link EmbeddingsOrchestrationConfig}
* @return The same instance of this {@link EmbeddingsOrchestrationConfig} class
*/
@Nonnull
- public EmbeddingsOrchestrationConfig moduleConfigs(
- @Nonnull final EmbeddingsModuleConfigs moduleConfigs) {
- this.moduleConfigs = moduleConfigs;
+ public EmbeddingsOrchestrationConfig modules(@Nonnull final EmbeddingsModuleConfigs modules) {
+ this.modules = modules;
return this;
}
/**
- * Get moduleConfigs
+ * Get modules
*
- * @return moduleConfigs The moduleConfigs of this {@link EmbeddingsOrchestrationConfig} instance.
+ * @return modules The modules of this {@link EmbeddingsOrchestrationConfig} instance.
*/
@Nonnull
- public EmbeddingsModuleConfigs getModuleConfigs() {
- return moduleConfigs;
+ public EmbeddingsModuleConfigs getModules() {
+ return modules;
}
/**
- * Set the moduleConfigs of this {@link EmbeddingsOrchestrationConfig} instance.
+ * Set the modules of this {@link EmbeddingsOrchestrationConfig} instance.
*
- * @param moduleConfigs The moduleConfigs of this {@link EmbeddingsOrchestrationConfig}
+ * @param modules The modules of this {@link EmbeddingsOrchestrationConfig}
*/
- public void setModuleConfigs(@Nonnull final EmbeddingsModuleConfigs moduleConfigs) {
- this.moduleConfigs = moduleConfigs;
+ public void setModules(@Nonnull final EmbeddingsModuleConfigs modules) {
+ this.modules = modules;
}
/**
@@ -110,7 +109,7 @@ public Object getCustomField(@Nonnull final String name) throws NoSuchElementExc
@Nonnull
public Map toMap() {
final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
- if (moduleConfigs != null) declaredFields.put("moduleConfigs", moduleConfigs);
+ if (modules != null) declaredFields.put("modules", modules);
return declaredFields;
}
@@ -139,12 +138,12 @@ public boolean equals(@Nullable final java.lang.Object o) {
(EmbeddingsOrchestrationConfig) o;
return Objects.equals(
this.cloudSdkCustomFields, embeddingsOrchestrationConfig.cloudSdkCustomFields)
- && Objects.equals(this.moduleConfigs, embeddingsOrchestrationConfig.moduleConfigs);
+ && Objects.equals(this.modules, embeddingsOrchestrationConfig.modules);
}
@Override
public int hashCode() {
- return Objects.hash(moduleConfigs, cloudSdkCustomFields);
+ return Objects.hash(modules, cloudSdkCustomFields);
}
@Override
@@ -152,7 +151,7 @@ public int hashCode() {
public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append("class EmbeddingsOrchestrationConfig {\n");
- sb.append(" moduleConfigs: ").append(toIndentedString(moduleConfigs)).append("\n");
+ sb.append(" modules: ").append(toIndentedString(modules)).append("\n");
cloudSdkCustomFields.forEach(
(k, v) ->
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));
@@ -175,18 +174,17 @@ private String toIndentedString(final java.lang.Object o) {
* EmbeddingsOrchestrationConfig} instance with all required arguments.
*/
public static Builder create() {
- return (moduleConfigs) -> new EmbeddingsOrchestrationConfig().moduleConfigs(moduleConfigs);
+ return (modules) -> new EmbeddingsOrchestrationConfig().modules(modules);
}
/** Builder helper class. */
public interface Builder {
/**
- * Set the moduleConfigs of this {@link EmbeddingsOrchestrationConfig} instance.
+ * Set the modules of this {@link EmbeddingsOrchestrationConfig} instance.
*
- * @param moduleConfigs The moduleConfigs of this {@link EmbeddingsOrchestrationConfig}
+ * @param modules The modules of this {@link EmbeddingsOrchestrationConfig}
* @return The EmbeddingsOrchestrationConfig instance.
*/
- EmbeddingsOrchestrationConfig moduleConfigs(
- @Nonnull final EmbeddingsModuleConfigs moduleConfigs);
+ EmbeddingsOrchestrationConfig modules(@Nonnull final EmbeddingsModuleConfigs modules);
}
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsPostRequest.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsPostRequest.java
index 850108088..b8e4c9480 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsPostRequest.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsPostRequest.java
@@ -28,8 +28,8 @@
public class EmbeddingsPostRequest
// CHECKSTYLE:ON
{
- @JsonProperty("orchestration_config")
- private EmbeddingsOrchestrationConfig orchestrationConfig;
+ @JsonProperty("config")
+ private EmbeddingsOrchestrationConfig config;
@JsonProperty("input")
private EmbeddingsInput input;
@@ -41,38 +41,34 @@ public class EmbeddingsPostRequest
protected EmbeddingsPostRequest() {}
/**
- * Set the orchestrationConfig of this {@link EmbeddingsPostRequest} instance and return the same
- * instance.
+ * Set the config of this {@link EmbeddingsPostRequest} instance and return the same instance.
*
- * @param orchestrationConfig The orchestrationConfig of this {@link EmbeddingsPostRequest}
+ * @param config The config of this {@link EmbeddingsPostRequest}
* @return The same instance of this {@link EmbeddingsPostRequest} class
*/
@Nonnull
- public EmbeddingsPostRequest orchestrationConfig(
- @Nonnull final EmbeddingsOrchestrationConfig orchestrationConfig) {
- this.orchestrationConfig = orchestrationConfig;
+ public EmbeddingsPostRequest config(@Nonnull final EmbeddingsOrchestrationConfig config) {
+ this.config = config;
return this;
}
/**
- * Get orchestrationConfig
+ * Get config
*
- * @return orchestrationConfig The orchestrationConfig of this {@link EmbeddingsPostRequest}
- * instance.
+ * @return config The config of this {@link EmbeddingsPostRequest} instance.
*/
@Nonnull
- public EmbeddingsOrchestrationConfig getOrchestrationConfig() {
- return orchestrationConfig;
+ public EmbeddingsOrchestrationConfig getConfig() {
+ return config;
}
/**
- * Set the orchestrationConfig of this {@link EmbeddingsPostRequest} instance.
+ * Set the config of this {@link EmbeddingsPostRequest} instance.
*
- * @param orchestrationConfig The orchestrationConfig of this {@link EmbeddingsPostRequest}
+ * @param config The config of this {@link EmbeddingsPostRequest}
*/
- public void setOrchestrationConfig(
- @Nonnull final EmbeddingsOrchestrationConfig orchestrationConfig) {
- this.orchestrationConfig = orchestrationConfig;
+ public void setConfig(@Nonnull final EmbeddingsOrchestrationConfig config) {
+ this.config = config;
}
/**
@@ -145,7 +141,7 @@ public Object getCustomField(@Nonnull final String name) throws NoSuchElementExc
@Nonnull
public Map toMap() {
final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
- if (orchestrationConfig != null) declaredFields.put("orchestrationConfig", orchestrationConfig);
+ if (config != null) declaredFields.put("config", config);
if (input != null) declaredFields.put("input", input);
return declaredFields;
}
@@ -172,13 +168,13 @@ public boolean equals(@Nullable final java.lang.Object o) {
}
final EmbeddingsPostRequest embeddingsPostRequest = (EmbeddingsPostRequest) o;
return Objects.equals(this.cloudSdkCustomFields, embeddingsPostRequest.cloudSdkCustomFields)
- && Objects.equals(this.orchestrationConfig, embeddingsPostRequest.orchestrationConfig)
+ && Objects.equals(this.config, embeddingsPostRequest.config)
&& Objects.equals(this.input, embeddingsPostRequest.input);
}
@Override
public int hashCode() {
- return Objects.hash(orchestrationConfig, input, cloudSdkCustomFields);
+ return Objects.hash(config, input, cloudSdkCustomFields);
}
@Override
@@ -186,9 +182,7 @@ public int hashCode() {
public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append("class EmbeddingsPostRequest {\n");
- sb.append(" orchestrationConfig: ")
- .append(toIndentedString(orchestrationConfig))
- .append("\n");
+ sb.append(" config: ").append(toIndentedString(config)).append("\n");
sb.append(" input: ").append(toIndentedString(input)).append("\n");
cloudSdkCustomFields.forEach(
(k, v) ->
@@ -212,20 +206,18 @@ private String toIndentedString(final java.lang.Object o) {
* instance with all required arguments.
*/
public static Builder create() {
- return (orchestrationConfig) ->
- (input) ->
- new EmbeddingsPostRequest().orchestrationConfig(orchestrationConfig).input(input);
+ return (config) -> (input) -> new EmbeddingsPostRequest().config(config).input(input);
}
/** Builder helper class. */
public interface Builder {
/**
- * Set the orchestrationConfig of this {@link EmbeddingsPostRequest} instance.
+ * Set the config of this {@link EmbeddingsPostRequest} instance.
*
- * @param orchestrationConfig The orchestrationConfig of this {@link EmbeddingsPostRequest}
+ * @param config The config of this {@link EmbeddingsPostRequest}
* @return The EmbeddingsPostRequest builder.
*/
- Builder1 orchestrationConfig(@Nonnull final EmbeddingsOrchestrationConfig orchestrationConfig);
+ Builder1 config(@Nonnull final EmbeddingsOrchestrationConfig config);
}
/** Builder helper class. */
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsPostResponse.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsPostResponse.java
index 7ef0372d2..16dba27d2 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsPostResponse.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/EmbeddingsPostResponse.java
@@ -31,11 +31,11 @@ public class EmbeddingsPostResponse
@JsonProperty("request_id")
private String requestId;
- @JsonProperty("module_results")
- private ModuleResultsBase moduleResults;
+ @JsonProperty("intermediate_results")
+ private ModuleResultsBase intermediateResults;
- @JsonProperty("orchestration_result")
- private EmbeddingsResponse orchestrationResult;
+ @JsonProperty("final_result")
+ private EmbeddingsResponse finalResult;
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
@@ -75,69 +75,69 @@ public void setRequestId(@Nonnull final String requestId) {
}
/**
- * Set the moduleResults of this {@link EmbeddingsPostResponse} instance and return the same
+ * Set the intermediateResults of this {@link EmbeddingsPostResponse} instance and return the same
* instance.
*
- * @param moduleResults The moduleResults of this {@link EmbeddingsPostResponse}
+ * @param intermediateResults The intermediateResults of this {@link EmbeddingsPostResponse}
* @return The same instance of this {@link EmbeddingsPostResponse} class
*/
@Nonnull
- public EmbeddingsPostResponse moduleResults(@Nullable final ModuleResultsBase moduleResults) {
- this.moduleResults = moduleResults;
+ public EmbeddingsPostResponse intermediateResults(
+ @Nullable final ModuleResultsBase intermediateResults) {
+ this.intermediateResults = intermediateResults;
return this;
}
/**
- * Get moduleResults
+ * Get intermediateResults
*
- * @return moduleResults The moduleResults of this {@link EmbeddingsPostResponse} instance.
+ * @return intermediateResults The intermediateResults of this {@link EmbeddingsPostResponse}
+ * instance.
*/
@Nonnull
- public ModuleResultsBase getModuleResults() {
- return moduleResults;
+ public ModuleResultsBase getIntermediateResults() {
+ return intermediateResults;
}
/**
- * Set the moduleResults of this {@link EmbeddingsPostResponse} instance.
+ * Set the intermediateResults of this {@link EmbeddingsPostResponse} instance.
*
- * @param moduleResults The moduleResults of this {@link EmbeddingsPostResponse}
+ * @param intermediateResults The intermediateResults of this {@link EmbeddingsPostResponse}
*/
- public void setModuleResults(@Nullable final ModuleResultsBase moduleResults) {
- this.moduleResults = moduleResults;
+ public void setIntermediateResults(@Nullable final ModuleResultsBase intermediateResults) {
+ this.intermediateResults = intermediateResults;
}
/**
- * Set the orchestrationResult of this {@link EmbeddingsPostResponse} instance and return the same
+ * Set the finalResult of this {@link EmbeddingsPostResponse} instance and return the same
* instance.
*
- * @param orchestrationResult The orchestrationResult of this {@link EmbeddingsPostResponse}
+ * @param finalResult The finalResult of this {@link EmbeddingsPostResponse}
* @return The same instance of this {@link EmbeddingsPostResponse} class
*/
@Nonnull
- public EmbeddingsPostResponse orchestrationResult(
- @Nullable final EmbeddingsResponse orchestrationResult) {
- this.orchestrationResult = orchestrationResult;
+ public EmbeddingsPostResponse finalResult(@Nullable final EmbeddingsResponse finalResult) {
+ this.finalResult = finalResult;
return this;
}
/**
- * Get orchestrationResult
+ * Get finalResult
*
- * @return orchestrationResult The orchestrationResult of this {@link EmbeddingsPostResponse}
- * instance.
+ * @return finalResult The finalResult of this {@link EmbeddingsPostResponse} instance.
*/
@Nonnull
- public EmbeddingsResponse getOrchestrationResult() {
- return orchestrationResult;
+ public EmbeddingsResponse getFinalResult() {
+ return finalResult;
}
/**
- * Set the orchestrationResult of this {@link EmbeddingsPostResponse} instance.
+ * Set the finalResult of this {@link EmbeddingsPostResponse} instance.
*
- * @param orchestrationResult The orchestrationResult of this {@link EmbeddingsPostResponse}
+ * @param finalResult The finalResult of this {@link EmbeddingsPostResponse}
*/
- public void setOrchestrationResult(@Nullable final EmbeddingsResponse orchestrationResult) {
- this.orchestrationResult = orchestrationResult;
+ public void setFinalResult(@Nullable final EmbeddingsResponse finalResult) {
+ this.finalResult = finalResult;
}
/**
@@ -180,8 +180,8 @@ public Object getCustomField(@Nonnull final String name) throws NoSuchElementExc
public Map toMap() {
final Map declaredFields = new LinkedHashMap<>(cloudSdkCustomFields);
if (requestId != null) declaredFields.put("requestId", requestId);
- if (moduleResults != null) declaredFields.put("moduleResults", moduleResults);
- if (orchestrationResult != null) declaredFields.put("orchestrationResult", orchestrationResult);
+ if (intermediateResults != null) declaredFields.put("intermediateResults", intermediateResults);
+ if (finalResult != null) declaredFields.put("finalResult", finalResult);
return declaredFields;
}
@@ -208,13 +208,13 @@ public boolean equals(@Nullable final java.lang.Object o) {
final EmbeddingsPostResponse embeddingsPostResponse = (EmbeddingsPostResponse) o;
return Objects.equals(this.cloudSdkCustomFields, embeddingsPostResponse.cloudSdkCustomFields)
&& Objects.equals(this.requestId, embeddingsPostResponse.requestId)
- && Objects.equals(this.moduleResults, embeddingsPostResponse.moduleResults)
- && Objects.equals(this.orchestrationResult, embeddingsPostResponse.orchestrationResult);
+ && Objects.equals(this.intermediateResults, embeddingsPostResponse.intermediateResults)
+ && Objects.equals(this.finalResult, embeddingsPostResponse.finalResult);
}
@Override
public int hashCode() {
- return Objects.hash(requestId, moduleResults, orchestrationResult, cloudSdkCustomFields);
+ return Objects.hash(requestId, intermediateResults, finalResult, cloudSdkCustomFields);
}
@Override
@@ -223,10 +223,10 @@ public String toString() {
final StringBuilder sb = new StringBuilder();
sb.append("class EmbeddingsPostResponse {\n");
sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
- sb.append(" moduleResults: ").append(toIndentedString(moduleResults)).append("\n");
- sb.append(" orchestrationResult: ")
- .append(toIndentedString(orchestrationResult))
+ sb.append(" intermediateResults: ")
+ .append(toIndentedString(intermediateResults))
.append("\n");
+ sb.append(" finalResult: ").append(toIndentedString(finalResult)).append("\n");
cloudSdkCustomFields.forEach(
(k, v) ->
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ErrorResponseSynchronous.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ErrorResponse.java
similarity index 63%
rename from orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ErrorResponseSynchronous.java
rename to orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ErrorResponse.java
index a39ee432a..76fc798e1 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ErrorResponseSynchronous.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ErrorResponse.java
@@ -23,9 +23,9 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-/** ErrorResponseSynchronous */
+/** ErrorResponse */
// CHECKSTYLE:OFF
-public class ErrorResponseSynchronous
+public class ErrorResponse
// CHECKSTYLE:ON
{
@JsonProperty("request_id")
@@ -41,23 +41,22 @@ public class ErrorResponseSynchronous
private String location;
@JsonProperty("module_results")
- private ModuleResultsSynchronous moduleResults;
+ private ModuleResults moduleResults;
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
- /** Default constructor for ErrorResponseSynchronous. */
- protected ErrorResponseSynchronous() {}
+ /** Default constructor for ErrorResponse. */
+ protected ErrorResponse() {}
/**
- * Set the requestId of this {@link ErrorResponseSynchronous} instance and return the same
- * instance.
+ * Set the requestId of this {@link ErrorResponse} instance and return the same instance.
*
- * @param requestId The requestId of this {@link ErrorResponseSynchronous}
- * @return The same instance of this {@link ErrorResponseSynchronous} class
+ * @param requestId The requestId of this {@link ErrorResponse}
+ * @return The same instance of this {@link ErrorResponse} class
*/
@Nonnull
- public ErrorResponseSynchronous requestId(@Nonnull final String requestId) {
+ public ErrorResponse requestId(@Nonnull final String requestId) {
this.requestId = requestId;
return this;
}
@@ -65,7 +64,7 @@ public ErrorResponseSynchronous requestId(@Nonnull final String requestId) {
/**
* Get requestId
*
- * @return requestId The requestId of this {@link ErrorResponseSynchronous} instance.
+ * @return requestId The requestId of this {@link ErrorResponse} instance.
*/
@Nonnull
public String getRequestId() {
@@ -73,22 +72,22 @@ public String getRequestId() {
}
/**
- * Set the requestId of this {@link ErrorResponseSynchronous} instance.
+ * Set the requestId of this {@link ErrorResponse} instance.
*
- * @param requestId The requestId of this {@link ErrorResponseSynchronous}
+ * @param requestId The requestId of this {@link ErrorResponse}
*/
public void setRequestId(@Nonnull final String requestId) {
this.requestId = requestId;
}
/**
- * Set the code of this {@link ErrorResponseSynchronous} instance and return the same instance.
+ * Set the code of this {@link ErrorResponse} instance and return the same instance.
*
- * @param code The code of this {@link ErrorResponseSynchronous}
- * @return The same instance of this {@link ErrorResponseSynchronous} class
+ * @param code The code of this {@link ErrorResponse}
+ * @return The same instance of this {@link ErrorResponse} class
*/
@Nonnull
- public ErrorResponseSynchronous code(@Nonnull final Integer code) {
+ public ErrorResponse code(@Nonnull final Integer code) {
this.code = code;
return this;
}
@@ -96,7 +95,7 @@ public ErrorResponseSynchronous code(@Nonnull final Integer code) {
/**
* Get code
*
- * @return code The code of this {@link ErrorResponseSynchronous} instance.
+ * @return code The code of this {@link ErrorResponse} instance.
*/
@Nonnull
public Integer getCode() {
@@ -104,22 +103,22 @@ public Integer getCode() {
}
/**
- * Set the code of this {@link ErrorResponseSynchronous} instance.
+ * Set the code of this {@link ErrorResponse} instance.
*
- * @param code The code of this {@link ErrorResponseSynchronous}
+ * @param code The code of this {@link ErrorResponse}
*/
public void setCode(@Nonnull final Integer code) {
this.code = code;
}
/**
- * Set the message of this {@link ErrorResponseSynchronous} instance and return the same instance.
+ * Set the message of this {@link ErrorResponse} instance and return the same instance.
*
- * @param message The message of this {@link ErrorResponseSynchronous}
- * @return The same instance of this {@link ErrorResponseSynchronous} class
+ * @param message The message of this {@link ErrorResponse}
+ * @return The same instance of this {@link ErrorResponse} class
*/
@Nonnull
- public ErrorResponseSynchronous message(@Nonnull final String message) {
+ public ErrorResponse message(@Nonnull final String message) {
this.message = message;
return this;
}
@@ -127,7 +126,7 @@ public ErrorResponseSynchronous message(@Nonnull final String message) {
/**
* Get message
*
- * @return message The message of this {@link ErrorResponseSynchronous} instance.
+ * @return message The message of this {@link ErrorResponse} instance.
*/
@Nonnull
public String getMessage() {
@@ -135,23 +134,22 @@ public String getMessage() {
}
/**
- * Set the message of this {@link ErrorResponseSynchronous} instance.
+ * Set the message of this {@link ErrorResponse} instance.
*
- * @param message The message of this {@link ErrorResponseSynchronous}
+ * @param message The message of this {@link ErrorResponse}
*/
public void setMessage(@Nonnull final String message) {
this.message = message;
}
/**
- * Set the location of this {@link ErrorResponseSynchronous} instance and return the same
- * instance.
+ * Set the location of this {@link ErrorResponse} instance and return the same instance.
*
* @param location Where the error occurred
- * @return The same instance of this {@link ErrorResponseSynchronous} class
+ * @return The same instance of this {@link ErrorResponse} class
*/
@Nonnull
- public ErrorResponseSynchronous location(@Nonnull final String location) {
+ public ErrorResponse location(@Nonnull final String location) {
this.location = location;
return this;
}
@@ -159,7 +157,7 @@ public ErrorResponseSynchronous location(@Nonnull final String location) {
/**
* Where the error occurred
*
- * @return location The location of this {@link ErrorResponseSynchronous} instance.
+ * @return location The location of this {@link ErrorResponse} instance.
*/
@Nonnull
public String getLocation() {
@@ -167,7 +165,7 @@ public String getLocation() {
}
/**
- * Set the location of this {@link ErrorResponseSynchronous} instance.
+ * Set the location of this {@link ErrorResponse} instance.
*
* @param location Where the error occurred
*/
@@ -176,15 +174,13 @@ public void setLocation(@Nonnull final String location) {
}
/**
- * Set the moduleResults of this {@link ErrorResponseSynchronous} instance and return the same
- * instance.
+ * Set the moduleResults of this {@link ErrorResponse} instance and return the same instance.
*
- * @param moduleResults The moduleResults of this {@link ErrorResponseSynchronous}
- * @return The same instance of this {@link ErrorResponseSynchronous} class
+ * @param moduleResults The moduleResults of this {@link ErrorResponse}
+ * @return The same instance of this {@link ErrorResponse} class
*/
@Nonnull
- public ErrorResponseSynchronous moduleResults(
- @Nullable final ModuleResultsSynchronous moduleResults) {
+ public ErrorResponse moduleResults(@Nullable final ModuleResults moduleResults) {
this.moduleResults = moduleResults;
return this;
}
@@ -192,24 +188,24 @@ public ErrorResponseSynchronous moduleResults(
/**
* Get moduleResults
*
- * @return moduleResults The moduleResults of this {@link ErrorResponseSynchronous} instance.
+ * @return moduleResults The moduleResults of this {@link ErrorResponse} instance.
*/
@Nonnull
- public ModuleResultsSynchronous getModuleResults() {
+ public ModuleResults getModuleResults() {
return moduleResults;
}
/**
- * Set the moduleResults of this {@link ErrorResponseSynchronous} instance.
+ * Set the moduleResults of this {@link ErrorResponse} instance.
*
- * @param moduleResults The moduleResults of this {@link ErrorResponseSynchronous}
+ * @param moduleResults The moduleResults of this {@link ErrorResponse}
*/
- public void setModuleResults(@Nullable final ModuleResultsSynchronous moduleResults) {
+ public void setModuleResults(@Nullable final ModuleResults moduleResults) {
this.moduleResults = moduleResults;
}
/**
- * Get the names of the unrecognizable properties of the {@link ErrorResponseSynchronous}.
+ * Get the names of the unrecognizable properties of the {@link ErrorResponse}.
*
* @return The set of properties names
*/
@@ -220,7 +216,7 @@ public Set getCustomFieldNames() {
}
/**
- * Get the value of an unrecognizable property of this {@link ErrorResponseSynchronous} instance.
+ * Get the value of an unrecognizable property of this {@link ErrorResponse} instance.
*
* @deprecated Use {@link #toMap()} instead.
* @param name The name of the property
@@ -231,15 +227,14 @@ public Set getCustomFieldNames() {
@Deprecated
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
if (!cloudSdkCustomFields.containsKey(name)) {
- throw new NoSuchElementException(
- "ErrorResponseSynchronous has no field with name '" + name + "'.");
+ throw new NoSuchElementException("ErrorResponse has no field with name '" + name + "'.");
}
return cloudSdkCustomFields.get(name);
}
/**
- * Get the value of all properties of this {@link ErrorResponseSynchronous} instance including
- * unrecognized properties.
+ * Get the value of all properties of this {@link ErrorResponse} instance including unrecognized
+ * properties.
*
* @return The map of all properties
*/
@@ -256,8 +251,8 @@ public Map toMap() {
}
/**
- * Set an unrecognizable property of this {@link ErrorResponseSynchronous} instance. If the map
- * previously contained a mapping for the key, the old value is replaced by the specified value.
+ * Set an unrecognizable property of this {@link ErrorResponse} 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
@@ -275,13 +270,13 @@ public boolean equals(@Nullable final java.lang.Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- final ErrorResponseSynchronous errorResponseSynchronous = (ErrorResponseSynchronous) o;
- return Objects.equals(this.cloudSdkCustomFields, errorResponseSynchronous.cloudSdkCustomFields)
- && Objects.equals(this.requestId, errorResponseSynchronous.requestId)
- && Objects.equals(this.code, errorResponseSynchronous.code)
- && Objects.equals(this.message, errorResponseSynchronous.message)
- && Objects.equals(this.location, errorResponseSynchronous.location)
- && Objects.equals(this.moduleResults, errorResponseSynchronous.moduleResults);
+ final ErrorResponse errorResponse = (ErrorResponse) o;
+ return Objects.equals(this.cloudSdkCustomFields, errorResponse.cloudSdkCustomFields)
+ && Objects.equals(this.requestId, errorResponse.requestId)
+ && Objects.equals(this.code, errorResponse.code)
+ && Objects.equals(this.message, errorResponse.message)
+ && Objects.equals(this.location, errorResponse.location)
+ && Objects.equals(this.moduleResults, errorResponse.moduleResults);
}
@Override
@@ -293,7 +288,7 @@ public int hashCode() {
@Nonnull
public String toString() {
final StringBuilder sb = new StringBuilder();
- sb.append("class ErrorResponseSynchronous {\n");
+ sb.append("class ErrorResponse {\n");
sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
@@ -317,15 +312,15 @@ private String toIndentedString(final java.lang.Object o) {
}
/**
- * Create a type-safe, fluent-api builder object to construct a new {@link
- * ErrorResponseSynchronous} instance with all required arguments.
+ * Create a type-safe, fluent-api builder object to construct a new {@link ErrorResponse} instance
+ * with all required arguments.
*/
public static Builder create() {
return (requestId) ->
(code) ->
(message) ->
(location) ->
- new ErrorResponseSynchronous()
+ new ErrorResponse()
.requestId(requestId)
.code(code)
.message(message)
@@ -335,10 +330,10 @@ public static Builder create() {
/** Builder helper class. */
public interface Builder {
/**
- * Set the requestId of this {@link ErrorResponseSynchronous} instance.
+ * Set the requestId of this {@link ErrorResponse} instance.
*
- * @param requestId The requestId of this {@link ErrorResponseSynchronous}
- * @return The ErrorResponseSynchronous builder.
+ * @param requestId The requestId of this {@link ErrorResponse}
+ * @return The ErrorResponse builder.
*/
Builder1 requestId(@Nonnull final String requestId);
}
@@ -346,10 +341,10 @@ public interface Builder {
/** Builder helper class. */
public interface Builder1 {
/**
- * Set the code of this {@link ErrorResponseSynchronous} instance.
+ * Set the code of this {@link ErrorResponse} instance.
*
- * @param code The code of this {@link ErrorResponseSynchronous}
- * @return The ErrorResponseSynchronous builder.
+ * @param code The code of this {@link ErrorResponse}
+ * @return The ErrorResponse builder.
*/
Builder2 code(@Nonnull final Integer code);
}
@@ -357,10 +352,10 @@ public interface Builder1 {
/** Builder helper class. */
public interface Builder2 {
/**
- * Set the message of this {@link ErrorResponseSynchronous} instance.
+ * Set the message of this {@link ErrorResponse} instance.
*
- * @param message The message of this {@link ErrorResponseSynchronous}
- * @return The ErrorResponseSynchronous builder.
+ * @param message The message of this {@link ErrorResponse}
+ * @return The ErrorResponse builder.
*/
Builder3 message(@Nonnull final String message);
}
@@ -368,11 +363,11 @@ public interface Builder2 {
/** Builder helper class. */
public interface Builder3 {
/**
- * Set the location of this {@link ErrorResponseSynchronous} instance.
+ * Set the location of this {@link ErrorResponse} instance.
*
* @param location Where the error occurred
- * @return The ErrorResponseSynchronous instance.
+ * @return The ErrorResponse instance.
*/
- ErrorResponseSynchronous location(@Nonnull final String location);
+ ErrorResponse location(@Nonnull final String location);
}
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/FilterConfig.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/InputFilterConfig.java
similarity index 88%
rename from orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/FilterConfig.java
rename to orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/InputFilterConfig.java
index 8fb497341..2f2daf275 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/FilterConfig.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/InputFilterConfig.java
@@ -14,10 +14,10 @@
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
-/** FilterConfig */
+/** InputFilterConfig */
@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION)
@JsonSubTypes({
- @JsonSubTypes.Type(value = AzureContentSafetyFilterConfig.class),
+ @JsonSubTypes.Type(value = AzureContentSafetyInputFilterConfig.class),
@JsonSubTypes.Type(value = LlamaGuard38bFilterConfig.class),
})
-public interface FilterConfig {}
+public interface InputFilterConfig {}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/InputFilteringConfig.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/InputFilteringConfig.java
index d71c9fb49..10da7556f 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/InputFilteringConfig.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/InputFilteringConfig.java
@@ -32,7 +32,7 @@ public class InputFilteringConfig
// CHECKSTYLE:ON
{
@JsonProperty("filters")
- private List filters = new ArrayList<>();
+ private List filters = new ArrayList<>();
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
@@ -44,11 +44,11 @@ protected InputFilteringConfig() {}
* Set the filters of this {@link InputFilteringConfig} instance and return the same instance.
*
* @param filters Configuration for content filtering services that should be used for the given
- * filtering step (input filtering or output filtering).
+ * filtering step (input filtering).
* @return The same instance of this {@link InputFilteringConfig} class
*/
@Nonnull
- public InputFilteringConfig filters(@Nonnull final List filters) {
+ public InputFilteringConfig filters(@Nonnull final List filters) {
this.filters = filters;
return this;
}
@@ -60,7 +60,7 @@ public InputFilteringConfig filters(@Nonnull final List filters) {
* @return The same instance of type {@link InputFilteringConfig}
*/
@Nonnull
- public InputFilteringConfig addFiltersItem(@Nonnull final FilterConfig filtersItem) {
+ public InputFilteringConfig addFiltersItem(@Nonnull final InputFilterConfig filtersItem) {
if (this.filters == null) {
this.filters = new ArrayList<>();
}
@@ -70,12 +70,12 @@ public InputFilteringConfig addFiltersItem(@Nonnull final FilterConfig filtersIt
/**
* Configuration for content filtering services that should be used for the given filtering step
- * (input filtering or output filtering).
+ * (input filtering).
*
* @return filters The filters of this {@link InputFilteringConfig} instance.
*/
@Nonnull
- public List getFilters() {
+ public List getFilters() {
return filters;
}
@@ -83,9 +83,9 @@ public List getFilters() {
* Set the filters of this {@link InputFilteringConfig} instance.
*
* @param filters Configuration for content filtering services that should be used for the given
- * filtering step (input filtering or output filtering).
+ * filtering step (input filtering).
*/
- public void setFilters(@Nonnull final List filters) {
+ public void setFilters(@Nonnull final List filters) {
this.filters = filters;
}
@@ -199,19 +199,19 @@ public interface Builder {
* Set the filters of this {@link InputFilteringConfig} instance.
*
* @param filters Configuration for content filtering services that should be used for the given
- * filtering step (input filtering or output filtering).
+ * filtering step (input filtering).
* @return The InputFilteringConfig instance.
*/
- InputFilteringConfig filters(@Nonnull final List filters);
+ InputFilteringConfig filters(@Nonnull final List filters);
/**
* Set the filters of this {@link InputFilteringConfig} instance.
*
* @param filters Configuration for content filtering services that should be used for the given
- * filtering step (input filtering or output filtering).
+ * filtering step (input filtering).
* @return The InputFilteringConfig instance.
*/
- default InputFilteringConfig filters(@Nonnull final FilterConfig... filters) {
+ default InputFilteringConfig filters(@Nonnull final InputFilterConfig... filters) {
return filters(Arrays.asList(filters));
}
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMChoiceSynchronous.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMChoice.java
similarity index 69%
rename from orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMChoiceSynchronous.java
rename to orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMChoice.java
index e46730e4b..c9aea33be 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMChoiceSynchronous.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMChoice.java
@@ -26,9 +26,9 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-/** LLMChoiceSynchronous */
+/** LLMChoice */
// CHECKSTYLE:OFF
-public class LLMChoiceSynchronous
+public class LLMChoice
// CHECKSTYLE:ON
{
@JsonProperty("index")
@@ -46,17 +46,17 @@ public class LLMChoiceSynchronous
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
- /** Default constructor for LLMChoiceSynchronous. */
- protected LLMChoiceSynchronous() {}
+ /** Default constructor for LLMChoice. */
+ protected LLMChoice() {}
/**
- * Set the index of this {@link LLMChoiceSynchronous} instance and return the same instance.
+ * Set the index of this {@link LLMChoice} instance and return the same instance.
*
* @param index Index of the choice
- * @return The same instance of this {@link LLMChoiceSynchronous} class
+ * @return The same instance of this {@link LLMChoice} class
*/
@Nonnull
- public LLMChoiceSynchronous index(@Nonnull final Integer index) {
+ public LLMChoice index(@Nonnull final Integer index) {
this.index = index;
return this;
}
@@ -64,7 +64,7 @@ public LLMChoiceSynchronous index(@Nonnull final Integer index) {
/**
* Index of the choice
*
- * @return index The index of this {@link LLMChoiceSynchronous} instance.
+ * @return index The index of this {@link LLMChoice} instance.
*/
@Nonnull
public Integer getIndex() {
@@ -72,7 +72,7 @@ public Integer getIndex() {
}
/**
- * Set the index of this {@link LLMChoiceSynchronous} instance.
+ * Set the index of this {@link LLMChoice} instance.
*
* @param index Index of the choice
*/
@@ -81,13 +81,13 @@ public void setIndex(@Nonnull final Integer index) {
}
/**
- * Set the message of this {@link LLMChoiceSynchronous} instance and return the same instance.
+ * Set the message of this {@link LLMChoice} instance and return the same instance.
*
- * @param message The message of this {@link LLMChoiceSynchronous}
- * @return The same instance of this {@link LLMChoiceSynchronous} class
+ * @param message The message of this {@link LLMChoice}
+ * @return The same instance of this {@link LLMChoice} class
*/
@Nonnull
- public LLMChoiceSynchronous message(@Nonnull final ResponseChatMessage message) {
+ public LLMChoice message(@Nonnull final ResponseChatMessage message) {
this.message = message;
return this;
}
@@ -95,7 +95,7 @@ public LLMChoiceSynchronous message(@Nonnull final ResponseChatMessage message)
/**
* Get message
*
- * @return message The message of this {@link LLMChoiceSynchronous} instance.
+ * @return message The message of this {@link LLMChoice} instance.
*/
@Nonnull
public ResponseChatMessage getMessage() {
@@ -103,35 +103,35 @@ public ResponseChatMessage getMessage() {
}
/**
- * Set the message of this {@link LLMChoiceSynchronous} instance.
+ * Set the message of this {@link LLMChoice} instance.
*
- * @param message The message of this {@link LLMChoiceSynchronous}
+ * @param message The message of this {@link LLMChoice}
*/
public void setMessage(@Nonnull final ResponseChatMessage message) {
this.message = message;
}
/**
- * Set the logprobs of this {@link LLMChoiceSynchronous} instance and return the same instance.
+ * Set the logprobs of this {@link LLMChoice} instance and return the same instance.
*
* @param logprobs Log probabilities
- * @return The same instance of this {@link LLMChoiceSynchronous} class
+ * @return The same instance of this {@link LLMChoice} class
*/
@Nonnull
- public LLMChoiceSynchronous logprobs(@Nullable final Map> logprobs) {
+ public LLMChoice logprobs(@Nullable final Map> logprobs) {
this.logprobs = logprobs;
return this;
}
/**
- * Put one logprobs instance to this {@link LLMChoiceSynchronous} instance.
+ * Put one logprobs instance to this {@link LLMChoice} instance.
*
* @param key The String key of this logprobs instance
* @param logprobsItem The logprobs that should be added under the given key
- * @return The same instance of type {@link LLMChoiceSynchronous}
+ * @return The same instance of type {@link LLMChoice}
*/
@Nonnull
- public LLMChoiceSynchronous putlogprobsItem(
+ public LLMChoice putlogprobsItem(
@Nonnull final String key, @Nonnull final List logprobsItem) {
if (this.logprobs == null) {
this.logprobs = new HashMap<>();
@@ -143,7 +143,7 @@ public LLMChoiceSynchronous putlogprobsItem(
/**
* Log probabilities
*
- * @return logprobs The logprobs of this {@link LLMChoiceSynchronous} instance.
+ * @return logprobs The logprobs of this {@link LLMChoice} instance.
*/
@Nonnull
public Map> getLogprobs() {
@@ -151,7 +151,7 @@ public Map> getLogprobs() {
}
/**
- * Set the logprobs of this {@link LLMChoiceSynchronous} instance.
+ * Set the logprobs of this {@link LLMChoice} instance.
*
* @param logprobs Log probabilities
*/
@@ -160,17 +160,16 @@ public void setLogprobs(@Nullable final Map> logprobs)
}
/**
- * Set the finishReason of this {@link LLMChoiceSynchronous} instance and return the same
- * instance.
+ * Set the finishReason of this {@link LLMChoice} instance and return the same instance.
*
* @param finishReason Reason the model stopped generating tokens. 'stop' if the model hit
* a natural stop point or a provided stop sequence, 'length' if the maximum token
* number was reached, 'content_filter' if content was omitted due to a filter
* enforced by the LLM model provider or the content filtering module
- * @return The same instance of this {@link LLMChoiceSynchronous} class
+ * @return The same instance of this {@link LLMChoice} class
*/
@Nonnull
- public LLMChoiceSynchronous finishReason(@Nonnull final String finishReason) {
+ public LLMChoice finishReason(@Nonnull final String finishReason) {
this.finishReason = finishReason;
return this;
}
@@ -181,7 +180,7 @@ public LLMChoiceSynchronous finishReason(@Nonnull final String finishReason) {
* 'content_filter' if content was omitted due to a filter enforced by the LLM model
* provider or the content filtering module
*
- * @return finishReason The finishReason of this {@link LLMChoiceSynchronous} instance.
+ * @return finishReason The finishReason of this {@link LLMChoice} instance.
*/
@Nonnull
public String getFinishReason() {
@@ -189,7 +188,7 @@ public String getFinishReason() {
}
/**
- * Set the finishReason of this {@link LLMChoiceSynchronous} instance.
+ * Set the finishReason of this {@link LLMChoice} instance.
*
* @param finishReason Reason the model stopped generating tokens. 'stop' if the model hit
* a natural stop point or a provided stop sequence, 'length' if the maximum token
@@ -201,7 +200,7 @@ public void setFinishReason(@Nonnull final String finishReason) {
}
/**
- * Get the names of the unrecognizable properties of the {@link LLMChoiceSynchronous}.
+ * Get the names of the unrecognizable properties of the {@link LLMChoice}.
*
* @return The set of properties names
*/
@@ -212,7 +211,7 @@ public Set getCustomFieldNames() {
}
/**
- * Get the value of an unrecognizable property of this {@link LLMChoiceSynchronous} instance.
+ * Get the value of an unrecognizable property of this {@link LLMChoice} instance.
*
* @deprecated Use {@link #toMap()} instead.
* @param name The name of the property
@@ -223,15 +222,14 @@ public Set getCustomFieldNames() {
@Deprecated
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
if (!cloudSdkCustomFields.containsKey(name)) {
- throw new NoSuchElementException(
- "LLMChoiceSynchronous has no field with name '" + name + "'.");
+ throw new NoSuchElementException("LLMChoice has no field with name '" + name + "'.");
}
return cloudSdkCustomFields.get(name);
}
/**
- * Get the value of all properties of this {@link LLMChoiceSynchronous} instance including
- * unrecognized properties.
+ * Get the value of all properties of this {@link LLMChoice} instance including unrecognized
+ * properties.
*
* @return The map of all properties
*/
@@ -247,8 +245,8 @@ public Map toMap() {
}
/**
- * Set an unrecognizable property of this {@link LLMChoiceSynchronous} instance. If the map
- * previously contained a mapping for the key, the old value is replaced by the specified value.
+ * Set an unrecognizable property of this {@link LLMChoice} 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
@@ -266,12 +264,12 @@ public boolean equals(@Nullable final java.lang.Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- final LLMChoiceSynchronous llMChoiceSynchronous = (LLMChoiceSynchronous) o;
- return Objects.equals(this.cloudSdkCustomFields, llMChoiceSynchronous.cloudSdkCustomFields)
- && Objects.equals(this.index, llMChoiceSynchronous.index)
- && Objects.equals(this.message, llMChoiceSynchronous.message)
- && Objects.equals(this.logprobs, llMChoiceSynchronous.logprobs)
- && Objects.equals(this.finishReason, llMChoiceSynchronous.finishReason);
+ final LLMChoice llMChoice = (LLMChoice) o;
+ return Objects.equals(this.cloudSdkCustomFields, llMChoice.cloudSdkCustomFields)
+ && Objects.equals(this.index, llMChoice.index)
+ && Objects.equals(this.message, llMChoice.message)
+ && Objects.equals(this.logprobs, llMChoice.logprobs)
+ && Objects.equals(this.finishReason, llMChoice.finishReason);
}
@Override
@@ -283,7 +281,7 @@ public int hashCode() {
@Nonnull
public String toString() {
final StringBuilder sb = new StringBuilder();
- sb.append("class LLMChoiceSynchronous {\n");
+ sb.append("class LLMChoice {\n");
sb.append(" index: ").append(toIndentedString(index)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append(" logprobs: ").append(toIndentedString(logprobs)).append("\n");
@@ -306,23 +304,23 @@ private String toIndentedString(final java.lang.Object o) {
}
/**
- * Create a type-safe, fluent-api builder object to construct a new {@link LLMChoiceSynchronous}
- * instance with all required arguments.
+ * Create a type-safe, fluent-api builder object to construct a new {@link LLMChoice} instance
+ * with all required arguments.
*/
public static Builder create() {
return (index) ->
(message) ->
(finishReason) ->
- new LLMChoiceSynchronous().index(index).message(message).finishReason(finishReason);
+ new LLMChoice().index(index).message(message).finishReason(finishReason);
}
/** Builder helper class. */
public interface Builder {
/**
- * Set the index of this {@link LLMChoiceSynchronous} instance.
+ * Set the index of this {@link LLMChoice} instance.
*
* @param index Index of the choice
- * @return The LLMChoiceSynchronous builder.
+ * @return The LLMChoice builder.
*/
Builder1 index(@Nonnull final Integer index);
}
@@ -330,10 +328,10 @@ public interface Builder {
/** Builder helper class. */
public interface Builder1 {
/**
- * Set the message of this {@link LLMChoiceSynchronous} instance.
+ * Set the message of this {@link LLMChoice} instance.
*
- * @param message The message of this {@link LLMChoiceSynchronous}
- * @return The LLMChoiceSynchronous builder.
+ * @param message The message of this {@link LLMChoice}
+ * @return The LLMChoice builder.
*/
Builder2 message(@Nonnull final ResponseChatMessage message);
}
@@ -341,14 +339,14 @@ public interface Builder1 {
/** Builder helper class. */
public interface Builder2 {
/**
- * Set the finishReason of this {@link LLMChoiceSynchronous} instance.
+ * Set the finishReason of this {@link LLMChoice} instance.
*
* @param finishReason Reason the model stopped generating tokens. 'stop' if the model
* hit a natural stop point or a provided stop sequence, 'length' if the maximum
* token number was reached, 'content_filter' if content was omitted due to a filter
* enforced by the LLM model provider or the content filtering module
- * @return The LLMChoiceSynchronous instance.
+ * @return The LLMChoice instance.
*/
- LLMChoiceSynchronous finishReason(@Nonnull final String finishReason);
+ LLMChoice finishReason(@Nonnull final String finishReason);
}
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMModuleResultSynchronous.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMModuleResult.java
similarity index 60%
rename from orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMModuleResultSynchronous.java
rename to orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMModuleResult.java
index 896f2cb73..10063bb70 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMModuleResultSynchronous.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LLMModuleResult.java
@@ -28,7 +28,7 @@
/** Output of LLM module. Follows the OpenAI spec. */
// CHECKSTYLE:OFF
-public class LLMModuleResultSynchronous
+public class LLMModuleResult
// CHECKSTYLE:ON
{
@JsonProperty("id")
@@ -47,7 +47,7 @@ public class LLMModuleResultSynchronous
private String systemFingerprint;
@JsonProperty("choices")
- private List choices = new ArrayList<>();
+ private List choices = new ArrayList<>();
@JsonProperty("usage")
private TokenUsage usage;
@@ -55,17 +55,17 @@ public class LLMModuleResultSynchronous
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
- /** Default constructor for LLMModuleResultSynchronous. */
- protected LLMModuleResultSynchronous() {}
+ /** Default constructor for LLMModuleResult. */
+ protected LLMModuleResult() {}
/**
- * Set the id of this {@link LLMModuleResultSynchronous} instance and return the same instance.
+ * Set the id of this {@link LLMModuleResult} instance and return the same instance.
*
* @param id ID of the response
- * @return The same instance of this {@link LLMModuleResultSynchronous} class
+ * @return The same instance of this {@link LLMModuleResult} class
*/
@Nonnull
- public LLMModuleResultSynchronous id(@Nonnull final String id) {
+ public LLMModuleResult id(@Nonnull final String id) {
this.id = id;
return this;
}
@@ -73,7 +73,7 @@ public LLMModuleResultSynchronous id(@Nonnull final String id) {
/**
* ID of the response
*
- * @return id The id of this {@link LLMModuleResultSynchronous} instance.
+ * @return id The id of this {@link LLMModuleResult} instance.
*/
@Nonnull
public String getId() {
@@ -81,7 +81,7 @@ public String getId() {
}
/**
- * Set the id of this {@link LLMModuleResultSynchronous} instance.
+ * Set the id of this {@link LLMModuleResult} instance.
*
* @param id ID of the response
*/
@@ -90,14 +90,13 @@ public void setId(@Nonnull final String id) {
}
/**
- * Set the _object of this {@link LLMModuleResultSynchronous} instance and return the same
- * instance.
+ * Set the _object of this {@link LLMModuleResult} instance and return the same instance.
*
* @param _object Object type
- * @return The same instance of this {@link LLMModuleResultSynchronous} class
+ * @return The same instance of this {@link LLMModuleResult} class
*/
@Nonnull
- public LLMModuleResultSynchronous _object(@Nonnull final String _object) {
+ public LLMModuleResult _object(@Nonnull final String _object) {
this._object = _object;
return this;
}
@@ -105,7 +104,7 @@ public LLMModuleResultSynchronous _object(@Nonnull final String _object) {
/**
* Object type
*
- * @return _object The _object of this {@link LLMModuleResultSynchronous} instance.
+ * @return _object The _object of this {@link LLMModuleResult} instance.
*/
@Nonnull
public String getObject() {
@@ -113,7 +112,7 @@ public String getObject() {
}
/**
- * Set the _object of this {@link LLMModuleResultSynchronous} instance.
+ * Set the _object of this {@link LLMModuleResult} instance.
*
* @param _object Object type
*/
@@ -122,14 +121,13 @@ public void setObject(@Nonnull final String _object) {
}
/**
- * Set the created of this {@link LLMModuleResultSynchronous} instance and return the same
- * instance.
+ * Set the created of this {@link LLMModuleResult} instance and return the same instance.
*
* @param created Unix timestamp
- * @return The same instance of this {@link LLMModuleResultSynchronous} class
+ * @return The same instance of this {@link LLMModuleResult} class
*/
@Nonnull
- public LLMModuleResultSynchronous created(@Nonnull final Integer created) {
+ public LLMModuleResult created(@Nonnull final Integer created) {
this.created = created;
return this;
}
@@ -137,7 +135,7 @@ public LLMModuleResultSynchronous created(@Nonnull final Integer created) {
/**
* Unix timestamp
*
- * @return created The created of this {@link LLMModuleResultSynchronous} instance.
+ * @return created The created of this {@link LLMModuleResult} instance.
*/
@Nonnull
public Integer getCreated() {
@@ -145,7 +143,7 @@ public Integer getCreated() {
}
/**
- * Set the created of this {@link LLMModuleResultSynchronous} instance.
+ * Set the created of this {@link LLMModuleResult} instance.
*
* @param created Unix timestamp
*/
@@ -154,13 +152,13 @@ public void setCreated(@Nonnull final Integer created) {
}
/**
- * Set the model of this {@link LLMModuleResultSynchronous} instance and return the same instance.
+ * Set the model of this {@link LLMModuleResult} instance and return the same instance.
*
* @param model Model name
- * @return The same instance of this {@link LLMModuleResultSynchronous} class
+ * @return The same instance of this {@link LLMModuleResult} class
*/
@Nonnull
- public LLMModuleResultSynchronous model(@Nonnull final String model) {
+ public LLMModuleResult model(@Nonnull final String model) {
this.model = model;
return this;
}
@@ -168,7 +166,7 @@ public LLMModuleResultSynchronous model(@Nonnull final String model) {
/**
* Model name
*
- * @return model The model of this {@link LLMModuleResultSynchronous} instance.
+ * @return model The model of this {@link LLMModuleResult} instance.
*/
@Nonnull
public String getModel() {
@@ -176,7 +174,7 @@ public String getModel() {
}
/**
- * Set the model of this {@link LLMModuleResultSynchronous} instance.
+ * Set the model of this {@link LLMModuleResult} instance.
*
* @param model Model name
*/
@@ -185,14 +183,14 @@ public void setModel(@Nonnull final String model) {
}
/**
- * Set the systemFingerprint of this {@link LLMModuleResultSynchronous} instance and return the
- * same instance.
+ * Set the systemFingerprint of this {@link LLMModuleResult} instance and return the same
+ * instance.
*
* @param systemFingerprint System fingerprint
- * @return The same instance of this {@link LLMModuleResultSynchronous} class
+ * @return The same instance of this {@link LLMModuleResult} class
*/
@Nonnull
- public LLMModuleResultSynchronous systemFingerprint(@Nullable final String systemFingerprint) {
+ public LLMModuleResult systemFingerprint(@Nullable final String systemFingerprint) {
this.systemFingerprint = systemFingerprint;
return this;
}
@@ -200,8 +198,7 @@ public LLMModuleResultSynchronous systemFingerprint(@Nullable final String syste
/**
* System fingerprint
*
- * @return systemFingerprint The systemFingerprint of this {@link LLMModuleResultSynchronous}
- * instance.
+ * @return systemFingerprint The systemFingerprint of this {@link LLMModuleResult} instance.
*/
@Nonnull
public String getSystemFingerprint() {
@@ -209,7 +206,7 @@ public String getSystemFingerprint() {
}
/**
- * Set the systemFingerprint of this {@link LLMModuleResultSynchronous} instance.
+ * Set the systemFingerprint of this {@link LLMModuleResult} instance.
*
* @param systemFingerprint System fingerprint
*/
@@ -218,27 +215,25 @@ public void setSystemFingerprint(@Nullable final String systemFingerprint) {
}
/**
- * Set the choices of this {@link LLMModuleResultSynchronous} instance and return the same
- * instance.
+ * Set the choices of this {@link LLMModuleResult} instance and return the same instance.
*
* @param choices Choices
- * @return The same instance of this {@link LLMModuleResultSynchronous} class
+ * @return The same instance of this {@link LLMModuleResult} class
*/
@Nonnull
- public LLMModuleResultSynchronous choices(@Nonnull final List choices) {
+ public LLMModuleResult choices(@Nonnull final List choices) {
this.choices = choices;
return this;
}
/**
- * Add one choices instance to this {@link LLMModuleResultSynchronous}.
+ * Add one choices instance to this {@link LLMModuleResult}.
*
* @param choicesItem The choices that should be added
- * @return The same instance of type {@link LLMModuleResultSynchronous}
+ * @return The same instance of type {@link LLMModuleResult}
*/
@Nonnull
- public LLMModuleResultSynchronous addChoicesItem(
- @Nonnull final LLMChoiceSynchronous choicesItem) {
+ public LLMModuleResult addChoicesItem(@Nonnull final LLMChoice choicesItem) {
if (this.choices == null) {
this.choices = new ArrayList<>();
}
@@ -249,30 +244,30 @@ public LLMModuleResultSynchronous addChoicesItem(
/**
* Choices
*
- * @return choices The choices of this {@link LLMModuleResultSynchronous} instance.
+ * @return choices The choices of this {@link LLMModuleResult} instance.
*/
@Nonnull
- public List getChoices() {
+ public List getChoices() {
return choices;
}
/**
- * Set the choices of this {@link LLMModuleResultSynchronous} instance.
+ * Set the choices of this {@link LLMModuleResult} instance.
*
* @param choices Choices
*/
- public void setChoices(@Nonnull final List choices) {
+ public void setChoices(@Nonnull final List choices) {
this.choices = choices;
}
/**
- * Set the usage of this {@link LLMModuleResultSynchronous} instance and return the same instance.
+ * Set the usage of this {@link LLMModuleResult} instance and return the same instance.
*
- * @param usage The usage of this {@link LLMModuleResultSynchronous}
- * @return The same instance of this {@link LLMModuleResultSynchronous} class
+ * @param usage The usage of this {@link LLMModuleResult}
+ * @return The same instance of this {@link LLMModuleResult} class
*/
@Nonnull
- public LLMModuleResultSynchronous usage(@Nonnull final TokenUsage usage) {
+ public LLMModuleResult usage(@Nonnull final TokenUsage usage) {
this.usage = usage;
return this;
}
@@ -280,7 +275,7 @@ public LLMModuleResultSynchronous usage(@Nonnull final TokenUsage usage) {
/**
* Get usage
*
- * @return usage The usage of this {@link LLMModuleResultSynchronous} instance.
+ * @return usage The usage of this {@link LLMModuleResult} instance.
*/
@Nonnull
public TokenUsage getUsage() {
@@ -288,16 +283,16 @@ public TokenUsage getUsage() {
}
/**
- * Set the usage of this {@link LLMModuleResultSynchronous} instance.
+ * Set the usage of this {@link LLMModuleResult} instance.
*
- * @param usage The usage of this {@link LLMModuleResultSynchronous}
+ * @param usage The usage of this {@link LLMModuleResult}
*/
public void setUsage(@Nonnull final TokenUsage usage) {
this.usage = usage;
}
/**
- * Get the names of the unrecognizable properties of the {@link LLMModuleResultSynchronous}.
+ * Get the names of the unrecognizable properties of the {@link LLMModuleResult}.
*
* @return The set of properties names
*/
@@ -308,8 +303,7 @@ public Set getCustomFieldNames() {
}
/**
- * Get the value of an unrecognizable property of this {@link LLMModuleResultSynchronous}
- * instance.
+ * Get the value of an unrecognizable property of this {@link LLMModuleResult} instance.
*
* @deprecated Use {@link #toMap()} instead.
* @param name The name of the property
@@ -320,15 +314,14 @@ public Set getCustomFieldNames() {
@Deprecated
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
if (!cloudSdkCustomFields.containsKey(name)) {
- throw new NoSuchElementException(
- "LLMModuleResultSynchronous has no field with name '" + name + "'.");
+ throw new NoSuchElementException("LLMModuleResult has no field with name '" + name + "'.");
}
return cloudSdkCustomFields.get(name);
}
/**
- * Get the value of all properties of this {@link LLMModuleResultSynchronous} instance including
- * unrecognized properties.
+ * Get the value of all properties of this {@link LLMModuleResult} instance including unrecognized
+ * properties.
*
* @return The map of all properties
*/
@@ -347,8 +340,8 @@ public Map toMap() {
}
/**
- * Set an unrecognizable property of this {@link LLMModuleResultSynchronous} instance. If the map
- * previously contained a mapping for the key, the old value is replaced by the specified value.
+ * Set an unrecognizable property of this {@link LLMModuleResult} 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
@@ -366,16 +359,15 @@ public boolean equals(@Nullable final java.lang.Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- final LLMModuleResultSynchronous llMModuleResultSynchronous = (LLMModuleResultSynchronous) o;
- return Objects.equals(
- this.cloudSdkCustomFields, llMModuleResultSynchronous.cloudSdkCustomFields)
- && Objects.equals(this.id, llMModuleResultSynchronous.id)
- && Objects.equals(this._object, llMModuleResultSynchronous._object)
- && Objects.equals(this.created, llMModuleResultSynchronous.created)
- && Objects.equals(this.model, llMModuleResultSynchronous.model)
- && Objects.equals(this.systemFingerprint, llMModuleResultSynchronous.systemFingerprint)
- && Objects.equals(this.choices, llMModuleResultSynchronous.choices)
- && Objects.equals(this.usage, llMModuleResultSynchronous.usage);
+ final LLMModuleResult llMModuleResult = (LLMModuleResult) o;
+ return Objects.equals(this.cloudSdkCustomFields, llMModuleResult.cloudSdkCustomFields)
+ && Objects.equals(this.id, llMModuleResult.id)
+ && Objects.equals(this._object, llMModuleResult._object)
+ && Objects.equals(this.created, llMModuleResult.created)
+ && Objects.equals(this.model, llMModuleResult.model)
+ && Objects.equals(this.systemFingerprint, llMModuleResult.systemFingerprint)
+ && Objects.equals(this.choices, llMModuleResult.choices)
+ && Objects.equals(this.usage, llMModuleResult.usage);
}
@Override
@@ -388,7 +380,7 @@ public int hashCode() {
@Nonnull
public String toString() {
final StringBuilder sb = new StringBuilder();
- sb.append("class LLMModuleResultSynchronous {\n");
+ sb.append("class LLMModuleResult {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" _object: ").append(toIndentedString(_object)).append("\n");
sb.append(" created: ").append(toIndentedString(created)).append("\n");
@@ -414,8 +406,8 @@ private String toIndentedString(final java.lang.Object o) {
}
/**
- * Create a type-safe, fluent-api builder object to construct a new {@link
- * LLMModuleResultSynchronous} instance with all required arguments.
+ * Create a type-safe, fluent-api builder object to construct a new {@link LLMModuleResult}
+ * instance with all required arguments.
*/
public static Builder create() {
return (id) ->
@@ -424,7 +416,7 @@ public static Builder create() {
(model) ->
(choices) ->
(usage) ->
- new LLMModuleResultSynchronous()
+ new LLMModuleResult()
.id(id)
._object(_object)
.created(created)
@@ -436,10 +428,10 @@ public static Builder create() {
/** Builder helper class. */
public interface Builder {
/**
- * Set the id of this {@link LLMModuleResultSynchronous} instance.
+ * Set the id of this {@link LLMModuleResult} instance.
*
* @param id ID of the response
- * @return The LLMModuleResultSynchronous builder.
+ * @return The LLMModuleResult builder.
*/
Builder1 id(@Nonnull final String id);
}
@@ -447,10 +439,10 @@ public interface Builder {
/** Builder helper class. */
public interface Builder1 {
/**
- * Set the _object of this {@link LLMModuleResultSynchronous} instance.
+ * Set the _object of this {@link LLMModuleResult} instance.
*
* @param _object Object type
- * @return The LLMModuleResultSynchronous builder.
+ * @return The LLMModuleResult builder.
*/
Builder2 _object(@Nonnull final String _object);
}
@@ -458,10 +450,10 @@ public interface Builder1 {
/** Builder helper class. */
public interface Builder2 {
/**
- * Set the created of this {@link LLMModuleResultSynchronous} instance.
+ * Set the created of this {@link LLMModuleResult} instance.
*
* @param created Unix timestamp
- * @return The LLMModuleResultSynchronous builder.
+ * @return The LLMModuleResult builder.
*/
Builder3 created(@Nonnull final Integer created);
}
@@ -469,10 +461,10 @@ public interface Builder2 {
/** Builder helper class. */
public interface Builder3 {
/**
- * Set the model of this {@link LLMModuleResultSynchronous} instance.
+ * Set the model of this {@link LLMModuleResult} instance.
*
* @param model Model name
- * @return The LLMModuleResultSynchronous builder.
+ * @return The LLMModuleResult builder.
*/
Builder4 model(@Nonnull final String model);
}
@@ -480,20 +472,20 @@ public interface Builder3 {
/** Builder helper class. */
public interface Builder4 {
/**
- * Set the choices of this {@link LLMModuleResultSynchronous} instance.
+ * Set the choices of this {@link LLMModuleResult} instance.
*
* @param choices Choices
- * @return The LLMModuleResultSynchronous builder.
+ * @return The LLMModuleResult builder.
*/
- Builder5 choices(@Nonnull final List choices);
+ Builder5 choices(@Nonnull final List choices);
/**
- * Set the choices of this {@link LLMModuleResultSynchronous} instance.
+ * Set the choices of this {@link LLMModuleResult} instance.
*
* @param choices Choices
- * @return The LLMModuleResultSynchronous builder.
+ * @return The LLMModuleResult builder.
*/
- default Builder5 choices(@Nonnull final LLMChoiceSynchronous... choices) {
+ default Builder5 choices(@Nonnull final LLMChoice... choices) {
return choices(Arrays.asList(choices));
}
}
@@ -501,11 +493,11 @@ default Builder5 choices(@Nonnull final LLMChoiceSynchronous... choices) {
/** Builder helper class. */
public interface Builder5 {
/**
- * Set the usage of this {@link LLMModuleResultSynchronous} instance.
+ * Set the usage of this {@link LLMModuleResult} instance.
*
- * @param usage The usage of this {@link LLMModuleResultSynchronous}
- * @return The LLMModuleResultSynchronous instance.
+ * @param usage The usage of this {@link LLMModuleResult}
+ * @return The LLMModuleResult instance.
*/
- LLMModuleResultSynchronous usage(@Nonnull final TokenUsage usage);
+ LLMModuleResult usage(@Nonnull final TokenUsage usage);
}
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LlamaGuard38bFilterConfig.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LlamaGuard38bFilterConfig.java
index 4e848cfc2..686c1592e 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LlamaGuard38bFilterConfig.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/LlamaGuard38bFilterConfig.java
@@ -27,7 +27,7 @@
/** LlamaGuard38bFilterConfig */
// CHECKSTYLE:OFF
-public class LlamaGuard38bFilterConfig implements FilterConfig
+public class LlamaGuard38bFilterConfig implements InputFilterConfig, OutputFilterConfig
// CHECKSTYLE:ON
{
/** Name of the filter provider type */
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ModuleResultsSynchronous.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ModuleResults.java
similarity index 63%
rename from orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ModuleResultsSynchronous.java
rename to orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ModuleResults.java
index 7db2e0be2..d5af953ad 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ModuleResultsSynchronous.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/ModuleResults.java
@@ -27,7 +27,7 @@
/** Synchronous results of each module. */
// CHECKSTYLE:OFF
-public class ModuleResultsSynchronous
+public class ModuleResults
// CHECKSTYLE:ON
{
@JsonProperty("grounding")
@@ -52,26 +52,25 @@ public class ModuleResultsSynchronous
private GenericModuleResult outputTranslation;
@JsonProperty("llm")
- private LLMModuleResultSynchronous llm;
+ private LLMModuleResult llm;
@JsonProperty("output_unmasking")
- private List outputUnmasking = new ArrayList<>();
+ private List outputUnmasking = new ArrayList<>();
@JsonAnySetter @JsonAnyGetter
private final Map cloudSdkCustomFields = new LinkedHashMap<>();
- /** Default constructor for ModuleResultsSynchronous. */
- protected ModuleResultsSynchronous() {}
+ /** Default constructor for ModuleResults. */
+ protected ModuleResults() {}
/**
- * Set the grounding of this {@link ModuleResultsSynchronous} instance and return the same
- * instance.
+ * Set the grounding of this {@link ModuleResults} instance and return the same instance.
*
- * @param grounding The grounding of this {@link ModuleResultsSynchronous}
- * @return The same instance of this {@link ModuleResultsSynchronous} class
+ * @param grounding The grounding of this {@link ModuleResults}
+ * @return The same instance of this {@link ModuleResults} class
*/
@Nonnull
- public ModuleResultsSynchronous grounding(@Nullable final GenericModuleResult grounding) {
+ public ModuleResults grounding(@Nullable final GenericModuleResult grounding) {
this.grounding = grounding;
return this;
}
@@ -79,7 +78,7 @@ public ModuleResultsSynchronous grounding(@Nullable final GenericModuleResult gr
/**
* Get grounding
*
- * @return grounding The grounding of this {@link ModuleResultsSynchronous} instance.
+ * @return grounding The grounding of this {@link ModuleResults} instance.
*/
@Nonnull
public GenericModuleResult getGrounding() {
@@ -87,35 +86,34 @@ public GenericModuleResult getGrounding() {
}
/**
- * Set the grounding of this {@link ModuleResultsSynchronous} instance.
+ * Set the grounding of this {@link ModuleResults} instance.
*
- * @param grounding The grounding of this {@link ModuleResultsSynchronous}
+ * @param grounding The grounding of this {@link ModuleResults}
*/
public void setGrounding(@Nullable final GenericModuleResult grounding) {
this.grounding = grounding;
}
/**
- * Set the templating of this {@link ModuleResultsSynchronous} instance and return the same
- * instance.
+ * Set the templating of this {@link ModuleResults} instance and return the same instance.
*
- * @param templating The templating of this {@link ModuleResultsSynchronous}
- * @return The same instance of this {@link ModuleResultsSynchronous} class
+ * @param templating The templating of this {@link ModuleResults}
+ * @return The same instance of this {@link ModuleResults} class
*/
@Nonnull
- public ModuleResultsSynchronous templating(@Nullable final List templating) {
+ public ModuleResults templating(@Nullable final List templating) {
this.templating = templating;
return this;
}
/**
- * Add one templating instance to this {@link ModuleResultsSynchronous}.
+ * Add one templating instance to this {@link ModuleResults}.
*
* @param templatingItem The templating that should be added
- * @return The same instance of type {@link ModuleResultsSynchronous}
+ * @return The same instance of type {@link ModuleResults}
*/
@Nonnull
- public ModuleResultsSynchronous addTemplatingItem(@Nonnull final ChatMessage templatingItem) {
+ public ModuleResults addTemplatingItem(@Nonnull final ChatMessage templatingItem) {
if (this.templating == null) {
this.templating = new ArrayList<>();
}
@@ -126,7 +124,7 @@ public ModuleResultsSynchronous addTemplatingItem(@Nonnull final ChatMessage tem
/**
* Get templating
*
- * @return templating The templating of this {@link ModuleResultsSynchronous} instance.
+ * @return templating The templating of this {@link ModuleResults} instance.
*/
@Nonnull
public List getTemplating() {
@@ -134,24 +132,22 @@ public List getTemplating() {
}
/**
- * Set the templating of this {@link ModuleResultsSynchronous} instance.
+ * Set the templating of this {@link ModuleResults} instance.
*
- * @param templating The templating of this {@link ModuleResultsSynchronous}
+ * @param templating The templating of this {@link ModuleResults}
*/
public void setTemplating(@Nullable final List templating) {
this.templating = templating;
}
/**
- * Set the inputTranslation of this {@link ModuleResultsSynchronous} instance and return the same
- * instance.
+ * Set the inputTranslation of this {@link ModuleResults} instance and return the same instance.
*
- * @param inputTranslation The inputTranslation of this {@link ModuleResultsSynchronous}
- * @return The same instance of this {@link ModuleResultsSynchronous} class
+ * @param inputTranslation The inputTranslation of this {@link ModuleResults}
+ * @return The same instance of this {@link ModuleResults} class
*/
@Nonnull
- public ModuleResultsSynchronous inputTranslation(
- @Nullable final GenericModuleResult inputTranslation) {
+ public ModuleResults inputTranslation(@Nullable final GenericModuleResult inputTranslation) {
this.inputTranslation = inputTranslation;
return this;
}
@@ -159,8 +155,7 @@ public ModuleResultsSynchronous inputTranslation(
/**
* Get inputTranslation
*
- * @return inputTranslation The inputTranslation of this {@link ModuleResultsSynchronous}
- * instance.
+ * @return inputTranslation The inputTranslation of this {@link ModuleResults} instance.
*/
@Nonnull
public GenericModuleResult getInputTranslation() {
@@ -168,23 +163,22 @@ public GenericModuleResult getInputTranslation() {
}
/**
- * Set the inputTranslation of this {@link ModuleResultsSynchronous} instance.
+ * Set the inputTranslation of this {@link ModuleResults} instance.
*
- * @param inputTranslation The inputTranslation of this {@link ModuleResultsSynchronous}
+ * @param inputTranslation The inputTranslation of this {@link ModuleResults}
*/
public void setInputTranslation(@Nullable final GenericModuleResult inputTranslation) {
this.inputTranslation = inputTranslation;
}
/**
- * Set the inputMasking of this {@link ModuleResultsSynchronous} instance and return the same
- * instance.
+ * Set the inputMasking of this {@link ModuleResults} instance and return the same instance.
*
- * @param inputMasking The inputMasking of this {@link ModuleResultsSynchronous}
- * @return The same instance of this {@link ModuleResultsSynchronous} class
+ * @param inputMasking The inputMasking of this {@link ModuleResults}
+ * @return The same instance of this {@link ModuleResults} class
*/
@Nonnull
- public ModuleResultsSynchronous inputMasking(@Nullable final GenericModuleResult inputMasking) {
+ public ModuleResults inputMasking(@Nullable final GenericModuleResult inputMasking) {
this.inputMasking = inputMasking;
return this;
}
@@ -192,7 +186,7 @@ public ModuleResultsSynchronous inputMasking(@Nullable final GenericModuleResult
/**
* Get inputMasking
*
- * @return inputMasking The inputMasking of this {@link ModuleResultsSynchronous} instance.
+ * @return inputMasking The inputMasking of this {@link ModuleResults} instance.
*/
@Nonnull
public GenericModuleResult getInputMasking() {
@@ -200,24 +194,22 @@ public GenericModuleResult getInputMasking() {
}
/**
- * Set the inputMasking of this {@link ModuleResultsSynchronous} instance.
+ * Set the inputMasking of this {@link ModuleResults} instance.
*
- * @param inputMasking The inputMasking of this {@link ModuleResultsSynchronous}
+ * @param inputMasking The inputMasking of this {@link ModuleResults}
*/
public void setInputMasking(@Nullable final GenericModuleResult inputMasking) {
this.inputMasking = inputMasking;
}
/**
- * Set the inputFiltering of this {@link ModuleResultsSynchronous} instance and return the same
- * instance.
+ * Set the inputFiltering of this {@link ModuleResults} instance and return the same instance.
*
- * @param inputFiltering The inputFiltering of this {@link ModuleResultsSynchronous}
- * @return The same instance of this {@link ModuleResultsSynchronous} class
+ * @param inputFiltering The inputFiltering of this {@link ModuleResults}
+ * @return The same instance of this {@link ModuleResults} class
*/
@Nonnull
- public ModuleResultsSynchronous inputFiltering(
- @Nullable final GenericModuleResult inputFiltering) {
+ public ModuleResults inputFiltering(@Nullable final GenericModuleResult inputFiltering) {
this.inputFiltering = inputFiltering;
return this;
}
@@ -225,7 +217,7 @@ public ModuleResultsSynchronous inputFiltering(
/**
* Get inputFiltering
*
- * @return inputFiltering The inputFiltering of this {@link ModuleResultsSynchronous} instance.
+ * @return inputFiltering The inputFiltering of this {@link ModuleResults} instance.
*/
@Nonnull
public GenericModuleResult getInputFiltering() {
@@ -233,24 +225,22 @@ public GenericModuleResult getInputFiltering() {
}
/**
- * Set the inputFiltering of this {@link ModuleResultsSynchronous} instance.
+ * Set the inputFiltering of this {@link ModuleResults} instance.
*
- * @param inputFiltering The inputFiltering of this {@link ModuleResultsSynchronous}
+ * @param inputFiltering The inputFiltering of this {@link ModuleResults}
*/
public void setInputFiltering(@Nullable final GenericModuleResult inputFiltering) {
this.inputFiltering = inputFiltering;
}
/**
- * Set the outputFiltering of this {@link ModuleResultsSynchronous} instance and return the same
- * instance.
+ * Set the outputFiltering of this {@link ModuleResults} instance and return the same instance.
*
- * @param outputFiltering The outputFiltering of this {@link ModuleResultsSynchronous}
- * @return The same instance of this {@link ModuleResultsSynchronous} class
+ * @param outputFiltering The outputFiltering of this {@link ModuleResults}
+ * @return The same instance of this {@link ModuleResults} class
*/
@Nonnull
- public ModuleResultsSynchronous outputFiltering(
- @Nullable final GenericModuleResult outputFiltering) {
+ public ModuleResults outputFiltering(@Nullable final GenericModuleResult outputFiltering) {
this.outputFiltering = outputFiltering;
return this;
}
@@ -258,7 +248,7 @@ public ModuleResultsSynchronous outputFiltering(
/**
* Get outputFiltering
*
- * @return outputFiltering The outputFiltering of this {@link ModuleResultsSynchronous} instance.
+ * @return outputFiltering The outputFiltering of this {@link ModuleResults} instance.
*/
@Nonnull
public GenericModuleResult getOutputFiltering() {
@@ -266,24 +256,22 @@ public GenericModuleResult getOutputFiltering() {
}
/**
- * Set the outputFiltering of this {@link ModuleResultsSynchronous} instance.
+ * Set the outputFiltering of this {@link ModuleResults} instance.
*
- * @param outputFiltering The outputFiltering of this {@link ModuleResultsSynchronous}
+ * @param outputFiltering The outputFiltering of this {@link ModuleResults}
*/
public void setOutputFiltering(@Nullable final GenericModuleResult outputFiltering) {
this.outputFiltering = outputFiltering;
}
/**
- * Set the outputTranslation of this {@link ModuleResultsSynchronous} instance and return the same
- * instance.
+ * Set the outputTranslation of this {@link ModuleResults} instance and return the same instance.
*
- * @param outputTranslation The outputTranslation of this {@link ModuleResultsSynchronous}
- * @return The same instance of this {@link ModuleResultsSynchronous} class
+ * @param outputTranslation The outputTranslation of this {@link ModuleResults}
+ * @return The same instance of this {@link ModuleResults} class
*/
@Nonnull
- public ModuleResultsSynchronous outputTranslation(
- @Nullable final GenericModuleResult outputTranslation) {
+ public ModuleResults outputTranslation(@Nullable final GenericModuleResult outputTranslation) {
this.outputTranslation = outputTranslation;
return this;
}
@@ -291,8 +279,7 @@ public ModuleResultsSynchronous outputTranslation(
/**
* Get outputTranslation
*
- * @return outputTranslation The outputTranslation of this {@link ModuleResultsSynchronous}
- * instance.
+ * @return outputTranslation The outputTranslation of this {@link ModuleResults} instance.
*/
@Nonnull
public GenericModuleResult getOutputTranslation() {
@@ -300,22 +287,22 @@ public GenericModuleResult getOutputTranslation() {
}
/**
- * Set the outputTranslation of this {@link ModuleResultsSynchronous} instance.
+ * Set the outputTranslation of this {@link ModuleResults} instance.
*
- * @param outputTranslation The outputTranslation of this {@link ModuleResultsSynchronous}
+ * @param outputTranslation The outputTranslation of this {@link ModuleResults}
*/
public void setOutputTranslation(@Nullable final GenericModuleResult outputTranslation) {
this.outputTranslation = outputTranslation;
}
/**
- * Set the llm of this {@link ModuleResultsSynchronous} instance and return the same instance.
+ * Set the llm of this {@link ModuleResults} instance and return the same instance.
*
- * @param llm The llm of this {@link ModuleResultsSynchronous}
- * @return The same instance of this {@link ModuleResultsSynchronous} class
+ * @param llm The llm of this {@link ModuleResults}
+ * @return The same instance of this {@link ModuleResults} class
*/
@Nonnull
- public ModuleResultsSynchronous llm(@Nullable final LLMModuleResultSynchronous llm) {
+ public ModuleResults llm(@Nullable final LLMModuleResult llm) {
this.llm = llm;
return this;
}
@@ -323,45 +310,42 @@ public ModuleResultsSynchronous llm(@Nullable final LLMModuleResultSynchronous l
/**
* Get llm
*
- * @return llm The llm of this {@link ModuleResultsSynchronous} instance.
+ * @return llm The llm of this {@link ModuleResults} instance.
*/
@Nonnull
- public LLMModuleResultSynchronous getLlm() {
+ public LLMModuleResult getLlm() {
return llm;
}
/**
- * Set the llm of this {@link ModuleResultsSynchronous} instance.
+ * Set the llm of this {@link ModuleResults} instance.
*
- * @param llm The llm of this {@link ModuleResultsSynchronous}
+ * @param llm The llm of this {@link ModuleResults}
*/
- public void setLlm(@Nullable final LLMModuleResultSynchronous llm) {
+ public void setLlm(@Nullable final LLMModuleResult llm) {
this.llm = llm;
}
/**
- * Set the outputUnmasking of this {@link ModuleResultsSynchronous} instance and return the same
- * instance.
+ * Set the outputUnmasking of this {@link ModuleResults} instance and return the same instance.
*
- * @param outputUnmasking The outputUnmasking of this {@link ModuleResultsSynchronous}
- * @return The same instance of this {@link ModuleResultsSynchronous} class
+ * @param outputUnmasking The outputUnmasking of this {@link ModuleResults}
+ * @return The same instance of this {@link ModuleResults} class
*/
@Nonnull
- public ModuleResultsSynchronous outputUnmasking(
- @Nullable final List outputUnmasking) {
+ public ModuleResults outputUnmasking(@Nullable final List outputUnmasking) {
this.outputUnmasking = outputUnmasking;
return this;
}
/**
- * Add one outputUnmasking instance to this {@link ModuleResultsSynchronous}.
+ * Add one outputUnmasking instance to this {@link ModuleResults}.
*
* @param outputUnmaskingItem The outputUnmasking that should be added
- * @return The same instance of type {@link ModuleResultsSynchronous}
+ * @return The same instance of type {@link ModuleResults}
*/
@Nonnull
- public ModuleResultsSynchronous addOutputUnmaskingItem(
- @Nonnull final LLMChoiceSynchronous outputUnmaskingItem) {
+ public ModuleResults addOutputUnmaskingItem(@Nonnull final LLMChoice outputUnmaskingItem) {
if (this.outputUnmasking == null) {
this.outputUnmasking = new ArrayList<>();
}
@@ -372,24 +356,24 @@ public ModuleResultsSynchronous addOutputUnmaskingItem(
/**
* Get outputUnmasking
*
- * @return outputUnmasking The outputUnmasking of this {@link ModuleResultsSynchronous} instance.
+ * @return outputUnmasking The outputUnmasking of this {@link ModuleResults} instance.
*/
@Nonnull
- public List getOutputUnmasking() {
+ public List getOutputUnmasking() {
return outputUnmasking;
}
/**
- * Set the outputUnmasking of this {@link ModuleResultsSynchronous} instance.
+ * Set the outputUnmasking of this {@link ModuleResults} instance.
*
- * @param outputUnmasking The outputUnmasking of this {@link ModuleResultsSynchronous}
+ * @param outputUnmasking The outputUnmasking of this {@link ModuleResults}
*/
- public void setOutputUnmasking(@Nullable final List outputUnmasking) {
+ public void setOutputUnmasking(@Nullable final List outputUnmasking) {
this.outputUnmasking = outputUnmasking;
}
/**
- * Get the names of the unrecognizable properties of the {@link ModuleResultsSynchronous}.
+ * Get the names of the unrecognizable properties of the {@link ModuleResults}.
*
* @return The set of properties names
*/
@@ -400,7 +384,7 @@ public Set getCustomFieldNames() {
}
/**
- * Get the value of an unrecognizable property of this {@link ModuleResultsSynchronous} instance.
+ * Get the value of an unrecognizable property of this {@link ModuleResults} instance.
*
* @deprecated Use {@link #toMap()} instead.
* @param name The name of the property
@@ -411,15 +395,14 @@ public Set getCustomFieldNames() {
@Deprecated
public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
if (!cloudSdkCustomFields.containsKey(name)) {
- throw new NoSuchElementException(
- "ModuleResultsSynchronous has no field with name '" + name + "'.");
+ throw new NoSuchElementException("ModuleResults has no field with name '" + name + "'.");
}
return cloudSdkCustomFields.get(name);
}
/**
- * Get the value of all properties of this {@link ModuleResultsSynchronous} instance including
- * unrecognized properties.
+ * Get the value of all properties of this {@link ModuleResults} instance including unrecognized
+ * properties.
*
* @return The map of all properties
*/
@@ -440,8 +423,8 @@ public Map toMap() {
}
/**
- * Set an unrecognizable property of this {@link ModuleResultsSynchronous} instance. If the map
- * previously contained a mapping for the key, the old value is replaced by the specified value.
+ * Set an unrecognizable property of this {@link ModuleResults} 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
@@ -459,17 +442,17 @@ public boolean equals(@Nullable final java.lang.Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- final ModuleResultsSynchronous moduleResultsSynchronous = (ModuleResultsSynchronous) o;
- return Objects.equals(this.cloudSdkCustomFields, moduleResultsSynchronous.cloudSdkCustomFields)
- && Objects.equals(this.grounding, moduleResultsSynchronous.grounding)
- && Objects.equals(this.templating, moduleResultsSynchronous.templating)
- && Objects.equals(this.inputTranslation, moduleResultsSynchronous.inputTranslation)
- && Objects.equals(this.inputMasking, moduleResultsSynchronous.inputMasking)
- && Objects.equals(this.inputFiltering, moduleResultsSynchronous.inputFiltering)
- && Objects.equals(this.outputFiltering, moduleResultsSynchronous.outputFiltering)
- && Objects.equals(this.outputTranslation, moduleResultsSynchronous.outputTranslation)
- && Objects.equals(this.llm, moduleResultsSynchronous.llm)
- && Objects.equals(this.outputUnmasking, moduleResultsSynchronous.outputUnmasking);
+ final ModuleResults moduleResults = (ModuleResults) o;
+ return Objects.equals(this.cloudSdkCustomFields, moduleResults.cloudSdkCustomFields)
+ && Objects.equals(this.grounding, moduleResults.grounding)
+ && Objects.equals(this.templating, moduleResults.templating)
+ && Objects.equals(this.inputTranslation, moduleResults.inputTranslation)
+ && Objects.equals(this.inputMasking, moduleResults.inputMasking)
+ && Objects.equals(this.inputFiltering, moduleResults.inputFiltering)
+ && Objects.equals(this.outputFiltering, moduleResults.outputFiltering)
+ && Objects.equals(this.outputTranslation, moduleResults.outputTranslation)
+ && Objects.equals(this.llm, moduleResults.llm)
+ && Objects.equals(this.outputUnmasking, moduleResults.outputUnmasking);
}
@Override
@@ -491,7 +474,7 @@ public int hashCode() {
@Nonnull
public String toString() {
final StringBuilder sb = new StringBuilder();
- sb.append("class ModuleResultsSynchronous {\n");
+ sb.append("class ModuleResults {\n");
sb.append(" grounding: ").append(toIndentedString(grounding)).append("\n");
sb.append(" templating: ").append(toIndentedString(templating)).append("\n");
sb.append(" inputTranslation: ").append(toIndentedString(inputTranslation)).append("\n");
@@ -518,8 +501,8 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
- /** Create a new {@link ModuleResultsSynchronous} instance. No arguments are required. */
- public static ModuleResultsSynchronous create() {
- return new ModuleResultsSynchronous();
+ /** Create a new {@link ModuleResults} instance. No arguments are required. */
+ public static ModuleResults create() {
+ return new ModuleResults();
}
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/OutputFilterConfig.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/OutputFilterConfig.java
new file mode 100644
index 000000000..a8565a3f5
--- /dev/null
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/OutputFilterConfig.java
@@ -0,0 +1,23 @@
+/*
+ * Internal Orchestration Service API
+ * Orchestration is an inference service which provides common additional capabilities for business AI scenarios, such as content filtering and data masking. At the core of the service is the LLM module which allows for an easy, harmonized access to the language models of gen AI hub. The service is designed to be modular and extensible, allowing for the addition of new modules in the future. Each module can be configured independently and at runtime, allowing for a high degree of flexibility in the orchestration of AI services.
+ *
+ *
+ *
+ * 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.orchestration.model;
+
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+
+/** OutputFilterConfig */
+@JsonTypeInfo(use = JsonTypeInfo.Id.DEDUCTION)
+@JsonSubTypes({
+ @JsonSubTypes.Type(value = AzureContentSafetyOutputFilterConfig.class),
+ @JsonSubTypes.Type(value = LlamaGuard38bFilterConfig.class),
+})
+public interface OutputFilterConfig {}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/OutputFilteringConfig.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/OutputFilteringConfig.java
index cdf477275..4e4d6a169 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/OutputFilteringConfig.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/OutputFilteringConfig.java
@@ -32,7 +32,7 @@ public class OutputFilteringConfig
// CHECKSTYLE:ON
{
@JsonProperty("filters")
- private List filters = new ArrayList<>();
+ private List filters = new ArrayList<>();
@JsonProperty("stream_options")
private FilteringStreamOptions streamOptions;
@@ -47,11 +47,11 @@ protected OutputFilteringConfig() {}
* Set the filters of this {@link OutputFilteringConfig} instance and return the same instance.
*
* @param filters Configuration for content filtering services that should be used for the given
- * filtering step (input filtering or output filtering).
+ * filtering step (output filtering).
* @return The same instance of this {@link OutputFilteringConfig} class
*/
@Nonnull
- public OutputFilteringConfig filters(@Nonnull final List filters) {
+ public OutputFilteringConfig filters(@Nonnull final List filters) {
this.filters = filters;
return this;
}
@@ -63,7 +63,7 @@ public OutputFilteringConfig filters(@Nonnull final List filters)
* @return The same instance of type {@link OutputFilteringConfig}
*/
@Nonnull
- public OutputFilteringConfig addFiltersItem(@Nonnull final FilterConfig filtersItem) {
+ public OutputFilteringConfig addFiltersItem(@Nonnull final OutputFilterConfig filtersItem) {
if (this.filters == null) {
this.filters = new ArrayList<>();
}
@@ -73,12 +73,12 @@ public OutputFilteringConfig addFiltersItem(@Nonnull final FilterConfig filtersI
/**
* Configuration for content filtering services that should be used for the given filtering step
- * (input filtering or output filtering).
+ * (output filtering).
*
* @return filters The filters of this {@link OutputFilteringConfig} instance.
*/
@Nonnull
- public List getFilters() {
+ public List getFilters() {
return filters;
}
@@ -86,9 +86,9 @@ public List getFilters() {
* Set the filters of this {@link OutputFilteringConfig} instance.
*
* @param filters Configuration for content filtering services that should be used for the given
- * filtering step (input filtering or output filtering).
+ * filtering step (output filtering).
*/
- public void setFilters(@Nonnull final List filters) {
+ public void setFilters(@Nonnull final List filters) {
this.filters = filters;
}
@@ -237,19 +237,19 @@ public interface Builder {
* Set the filters of this {@link OutputFilteringConfig} instance.
*
* @param filters Configuration for content filtering services that should be used for the given
- * filtering step (input filtering or output filtering).
+ * filtering step (output filtering).
* @return The OutputFilteringConfig instance.
*/
- OutputFilteringConfig filters(@Nonnull final List filters);
+ OutputFilteringConfig filters(@Nonnull final List filters);
/**
* Set the filters of this {@link OutputFilteringConfig} instance.
*
* @param filters Configuration for content filtering services that should be used for the given
- * filtering step (input filtering or output filtering).
+ * filtering step (output filtering).
* @return The OutputFilteringConfig instance.
*/
- default OutputFilteringConfig filters(@Nonnull final FilterConfig... filters) {
+ default OutputFilteringConfig filters(@Nonnull final OutputFilterConfig... filters) {
return filters(Arrays.asList(filters));
}
}
diff --git a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/spring/OrchestrationSpringChatResponse.java b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/spring/OrchestrationSpringChatResponse.java
index fde3e39a1..c57a2c630 100644
--- a/orchestration/src/main/java/com/sap/ai/sdk/orchestration/spring/OrchestrationSpringChatResponse.java
+++ b/orchestration/src/main/java/com/sap/ai/sdk/orchestration/spring/OrchestrationSpringChatResponse.java
@@ -2,8 +2,8 @@
import com.google.common.annotations.Beta;
import com.sap.ai.sdk.orchestration.OrchestrationChatResponse;
-import com.sap.ai.sdk.orchestration.model.LLMChoiceSynchronous;
-import com.sap.ai.sdk.orchestration.model.LLMModuleResultSynchronous;
+import com.sap.ai.sdk.orchestration.model.LLMChoice;
+import com.sap.ai.sdk.orchestration.model.LLMModuleResult;
import com.sap.ai.sdk.orchestration.model.TokenUsage;
import java.util.List;
import java.util.Map;
@@ -40,12 +40,12 @@ public class OrchestrationSpringChatResponse extends ChatResponse {
}
@Nonnull
- static List toGenerations(@Nonnull final LLMModuleResultSynchronous result) {
+ static List toGenerations(@Nonnull final LLMModuleResult result) {
return result.getChoices().stream().map(OrchestrationSpringChatResponse::toGeneration).toList();
}
@Nonnull
- static Generation toGeneration(@Nonnull final LLMChoiceSynchronous choice) {
+ static Generation toGeneration(@Nonnull final LLMChoice choice) {
val metadata = ChatGenerationMetadata.builder().finishReason(choice.getFinishReason());
metadata.metadata("index", choice.getIndex());
if (!choice.getLogprobs().isEmpty()) {
@@ -68,7 +68,7 @@ static Generation toGeneration(@Nonnull final LLMChoiceSynchronous choice) {
@Nonnull
static ChatResponseMetadata toChatResponseMetadata(
- @Nonnull final LLMModuleResultSynchronous orchestrationResult) {
+ @Nonnull final LLMModuleResult orchestrationResult) {
val metadataBuilder = ChatResponseMetadata.builder();
metadataBuilder
diff --git a/orchestration/src/main/resources/spec/orchestration.yaml b/orchestration/src/main/resources/spec/orchestration.yaml
index 4bddce366..270b94f90 100644
--- a/orchestration/src/main/resources/spec/orchestration.yaml
+++ b/orchestration/src/main/resources/spec/orchestration.yaml
@@ -33,7 +33,7 @@ paths:
content:
application/json:
schema:
- $ref: "#/components/schemas/CompletionPostResponseSynchronous"
+ $ref: "#/components/schemas/CompletionPostResponse"
text/event-stream:
schema:
$ref: "#/components/schemas/CompletionPostResponseStreaming"
@@ -98,19 +98,19 @@ components:
additionalProperties: false
required:
- input
- - orchestration_config
+ - config
properties:
- orchestration_config:
+ config:
$ref: "#/components/schemas/EmbeddingsOrchestrationConfig"
input:
$ref: "#/components/schemas/EmbeddingsInput"
EmbeddingsOrchestrationConfig:
type: object
required:
- - module_configs
+ - modules
additionalProperties: false
properties:
- module_configs:
+ modules:
$ref: "#/components/schemas/EmbeddingsModuleConfigs"
EmbeddingsInput:
type: object
@@ -193,10 +193,10 @@ components:
properties:
request_id:
type: string
- module_results:
+ intermediate_results:
$ref: "#/components/schemas/ModuleResultsBase"
description: Results of each module of /embeddings endpoint(e.g. input masking).
- orchestration_result:
+ final_result:
$ref: "#/components/schemas/EmbeddingsResponse"
description: The response from request to embedding model following OpenAI specification.
EmbeddingsResponse:
@@ -514,7 +514,7 @@ components:
calling your function.
required:
- index
- CompletionPostResponseSynchronous:
+ CompletionPostResponse:
type: object
required:
- request_id
@@ -526,9 +526,9 @@ components:
type: string
example: "d4a67ea1-2bf9-4df7-8105-d48203ccff76"
module_results:
- $ref: "#/components/schemas/ModuleResultsSynchronous"
+ $ref: "#/components/schemas/ModuleResults"
orchestration_result:
- $ref: "#/components/schemas/LLMModuleResultSynchronous"
+ $ref: "#/components/schemas/LLMModuleResult"
CompletionPostResponseStreaming:
type: object
@@ -577,7 +577,7 @@ components:
$ref: "#/components/schemas/InputTranslationModuleConfig"
output_translation_module_config:
$ref: "#/components/schemas/OutputTranslationModuleConfig"
- # Abstract base class encompassing fields for both `ModuleResultsSynchronous` and `ModuleResultsStreaming`
+ # Abstract base class encompassing fields for both `ModuleResults` and `ModuleResultsStreaming`
# Not to be instantiated by llm-orchestration code
ModuleResultsBase:
description: Results of each module.
@@ -598,7 +598,7 @@ components:
$ref: "#/components/schemas/GenericModuleResult"
output_translation:
$ref: "#/components/schemas/GenericModuleResult"
- ModuleResultsSynchronous:
+ ModuleResults:
description: Synchronous results of each module.
type: object
additionalProperties: false
@@ -607,11 +607,11 @@ components:
- type: object
properties:
llm:
- $ref: "#/components/schemas/LLMModuleResultSynchronous"
+ $ref: "#/components/schemas/LLMModuleResult"
output_unmasking:
type: array
items:
- $ref: "#/components/schemas/LLMChoiceSynchronous"
+ $ref: "#/components/schemas/LLMChoice"
ModuleResultsStreaming:
description: Streaming results of each module.
type: object
@@ -685,7 +685,7 @@ components:
data:
type: object
description: Additional data object from the module
- LLMModuleResultSynchronous:
+ LLMModuleResult:
type: object
description: Output of LLM module. Follows the OpenAI spec.
required:
@@ -720,7 +720,7 @@ components:
type: array
description: Choices
items:
- $ref: "#/components/schemas/LLMChoiceSynchronous"
+ $ref: "#/components/schemas/LLMChoice"
usage:
$ref: "#/components/schemas/TokenUsage"
LLMModuleResultStreaming:
@@ -755,7 +755,7 @@ components:
$ref: "#/components/schemas/LLMChoiceStreaming"
usage:
$ref: "#/components/schemas/TokenUsage"
- LLMChoiceSynchronous:
+ LLMChoice:
type: object
required:
- index
@@ -1062,11 +1062,11 @@ components:
additionalProperties: false
properties:
filters:
- description: Configuration for content filtering services that should be used for the given filtering step (input filtering or output filtering).
+ description: Configuration for content filtering services that should be used for the given filtering step (input filtering).
type: array
minItems: 1
items:
- $ref: "#/components/schemas/FilterConfig"
+ $ref: "#/components/schemas/InputFilterConfig"
OutputFilteringConfig:
type: object
@@ -1075,11 +1075,11 @@ components:
additionalProperties: false
properties:
filters:
- description: Configuration for content filtering services that should be used for the given filtering step (input filtering or output filtering).
+ description: Configuration for content filtering services that should be used for the given filtering step (output filtering).
type: array
minItems: 1
items:
- $ref: "#/components/schemas/FilterConfig"
+ $ref: "#/components/schemas/OutputFilterConfig"
stream_options:
$ref: "#/components/schemas/FilteringStreamOptions"
@@ -1095,12 +1095,17 @@ components:
minimum: 0
maximum: 10000
- FilterConfig:
+ InputFilterConfig:
oneOf:
- - $ref: "#/components/schemas/AzureContentSafetyFilterConfig"
+ - $ref: "#/components/schemas/AzureContentSafetyInputFilterConfig"
- $ref: "#/components/schemas/LlamaGuard38bFilterConfig"
- AzureContentSafetyFilterConfig:
+ OutputFilterConfig:
+ oneOf:
+ - $ref: "#/components/schemas/AzureContentSafetyOutputFilterConfig"
+ - $ref: "#/components/schemas/LlamaGuard38bFilterConfig"
+
+ AzureContentSafetyInputFilterConfig:
type: object
required:
- type
@@ -1113,9 +1118,42 @@ components:
- azure_content_safety
example: azure_content_safety
config:
- $ref: "#/components/schemas/AzureContentSafety"
+ $ref: "#/components/schemas/AzureContentSafetyInput"
+
+ AzureContentSafetyOutputFilterConfig:
+ type: object
+ required:
+ - type
+ additionalProperties: false
+ properties:
+ type:
+ description: Name of the filter provider type
+ type: string
+ enum:
+ - azure_content_safety
+ example: azure_content_safety
+ config:
+ $ref: "#/components/schemas/AzureContentSafetyOutput"
+
+ AzureContentSafetyInput:
+ description: Filter configuration for Azure Content Safety
+ type: object
+ additionalProperties: false
+ properties:
+ Hate:
+ $ref: "#/components/schemas/AzureThreshold"
+ SelfHarm:
+ $ref: "#/components/schemas/AzureThreshold"
+ Sexual:
+ $ref: "#/components/schemas/AzureThreshold"
+ Violence:
+ $ref: "#/components/schemas/AzureThreshold"
+ PromptShield:
+ type: boolean
+ description: A flag to use prompt shield
+ default: false
- AzureContentSafety:
+ AzureContentSafetyOutput:
description: Filter configuration for Azure Content Safety
type: object
additionalProperties: false
@@ -1543,7 +1581,7 @@ components:
description: Language to which the text should be translated.
example: "en-US"
- ErrorResponseSynchronous:
+ ErrorResponse:
type: object
required:
- request_id
@@ -1565,7 +1603,7 @@ components:
description: Where the error occurred
example: "LLM Module"
module_results:
- $ref: "#/components/schemas/ModuleResultsSynchronous"
+ $ref: "#/components/schemas/ModuleResults"
ErrorResponseStreaming:
type: object
@@ -1597,13 +1635,13 @@ components:
content:
application/json:
schema:
- $ref: "#/components/schemas/ErrorResponseSynchronous"
+ $ref: "#/components/schemas/ErrorResponse"
CommonError:
description: Common Error
content:
application/json:
schema:
- $ref: "#/components/schemas/ErrorResponseSynchronous"
+ $ref: "#/components/schemas/ErrorResponse"
# https://pages.github.tools.sap/CPA/api-metadata-validator/rules/oas/sap-oas3-security/
securitySchemes:
@@ -1611,4 +1649,4 @@ components:
type: http
scheme: bearer
bearerFormat: JWT
- description: To use this API, you must have an AI Core access token.
+ description: To use this API, you must have an AI Core access token.
\ No newline at end of file
diff --git a/orchestration/src/test/java/com/sap/ai/sdk/orchestration/LLMModuleResultDeserializerTest.java b/orchestration/src/test/java/com/sap/ai/sdk/orchestration/LLMModuleResultDeserializerTest.java
index 1b75c75fb..bbd9571d9 100644
--- a/orchestration/src/test/java/com/sap/ai/sdk/orchestration/LLMModuleResultDeserializerTest.java
+++ b/orchestration/src/test/java/com/sap/ai/sdk/orchestration/LLMModuleResultDeserializerTest.java
@@ -2,7 +2,7 @@
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
-import com.sap.ai.sdk.orchestration.model.LLMModuleResultSynchronous;
+import com.sap.ai.sdk.orchestration.model.LLMModuleResult;
import lombok.SneakyThrows;
import org.junit.jupiter.api.Test;
@@ -41,7 +41,7 @@ void testSubtypeResolutionSynchronous() {
""";
var json = String.format(JSON, choices);
- var result = OrchestrationClient.JACKSON.readValue(json, LLMModuleResultSynchronous.class);
- assertThat(result).isExactlyInstanceOf(LLMModuleResultSynchronous.class);
+ var result = OrchestrationClient.JACKSON.readValue(json, LLMModuleResult.class);
+ assertThat(result).isExactlyInstanceOf(LLMModuleResult.class);
}
}
diff --git a/orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java b/orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java
index 8b7ab32bb..9a3e39dd5 100644
--- a/orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java
+++ b/orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java
@@ -1083,7 +1083,7 @@ void testEmbeddingCallWithMasking() {
"""
{
"request_id": "2ee98443-e1ee-9503-b800-e38b5b80fe45",
- "module_results": {
+ "intermediate_results": {
"input_masking": {
"message": "Embedding input is masked successfully.",
"data": {
@@ -1091,7 +1091,7 @@ void testEmbeddingCallWithMasking() {
}
}
},
- "orchestration_result": {
+ "final_result": {
"object": "list",
"data": [
{
@@ -1134,21 +1134,20 @@ void testEmbeddingCallWithMasking() {
val orchestrationConfig =
EmbeddingsOrchestrationConfig.create()
- .moduleConfigs(
+ .modules(
EmbeddingsModuleConfigs.create().embeddings(modelConfig).masking(maskingConfig));
val inputText =
EmbeddingsInput.create().text(EmbeddingsInputText.create("['Hello', 'Müller', '!']"));
- val request =
- EmbeddingsPostRequest.create().orchestrationConfig(orchestrationConfig).input(inputText);
+ val request = EmbeddingsPostRequest.create().config(orchestrationConfig).input(inputText);
EmbeddingsPostResponse response = client.embed(request);
assertThat(response).isNotNull();
assertThat(response.getRequestId()).isEqualTo("2ee98443-e1ee-9503-b800-e38b5b80fe45");
- val orchestrationResult = response.getOrchestrationResult();
+ val orchestrationResult = response.getFinalResult();
assertThat(orchestrationResult).isNotNull();
assertThat(orchestrationResult.getObject()).isEqualTo(EmbeddingsResponse.ObjectEnum.LIST);
assertThat(orchestrationResult.getModel()).isEqualTo("text-embedding-3-large");
@@ -1171,7 +1170,7 @@ void testEmbeddingCallWithMasking() {
assertThat(usage.getPromptTokens()).isEqualTo(10);
assertThat(usage.getTotalTokens()).isEqualTo(10);
- val moduleResults = response.getModuleResults();
+ val moduleResults = response.getIntermediateResults();
assertThat(moduleResults).isNotNull();
assertThat(moduleResults.getInputMasking()).isNotNull();
assertThat(moduleResults.getInputMasking().getMessage())
@@ -1186,8 +1185,8 @@ void testEmbeddingCallWithMasking() {
equalToJson(
"""
{
- "orchestration_config": {
- "module_configs": {
+ "config": {
+ "modules": {
"embeddings": {
"model": {
"name": "text-embedding-3-large",
diff --git a/orchestration/src/test/java/com/sap/ai/sdk/orchestration/spring/OrchestrationChatResponseTest.java b/orchestration/src/test/java/com/sap/ai/sdk/orchestration/spring/OrchestrationChatResponseTest.java
index 6b047ecac..55d9e40a2 100644
--- a/orchestration/src/test/java/com/sap/ai/sdk/orchestration/spring/OrchestrationChatResponseTest.java
+++ b/orchestration/src/test/java/com/sap/ai/sdk/orchestration/spring/OrchestrationChatResponseTest.java
@@ -2,8 +2,8 @@
import static org.assertj.core.api.Assertions.assertThat;
-import com.sap.ai.sdk.orchestration.model.LLMChoiceSynchronous;
-import com.sap.ai.sdk.orchestration.model.LLMModuleResultSynchronous;
+import com.sap.ai.sdk.orchestration.model.LLMChoice;
+import com.sap.ai.sdk.orchestration.model.LLMModuleResult;
import com.sap.ai.sdk.orchestration.model.ResponseChatMessage;
import com.sap.ai.sdk.orchestration.model.TokenUsage;
import java.util.List;
@@ -15,7 +15,7 @@ class OrchestrationChatResponseTest {
@Test
void testToGeneration() {
var choice =
- LLMChoiceSynchronous.create()
+ LLMChoice.create()
.index(0)
.message(
ResponseChatMessage.create()
@@ -33,7 +33,7 @@ void testToGeneration() {
@Test
void testToChatResponseMetadata() {
var moduleResult =
- LLMModuleResultSynchronous.create()
+ LLMModuleResult.create()
.id("test-id")
._object("test-object")
.created(123456789)
diff --git a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OrchestrationService.java b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OrchestrationService.java
index 231cf754c..67b983881 100644
--- a/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OrchestrationService.java
+++ b/sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/OrchestrationService.java
@@ -166,7 +166,7 @@ public OrchestrationChatResponse inputFiltering(@Nonnull final AzureFilterThresh
val prompt =
new OrchestrationPrompt("'We shall spill blood tonight', said the operation in-charge.");
val filterConfig =
- new AzureContentFilter().hate(policy).selfHarm(policy).sexual(policy).violence(policy);
+ new AzureContentFilter().hate(policy).selfHarm(policy).sexual(policy).violence(policy).promptShield(true);
val configWithFilter = config.withInputFiltering(filterConfig);