Skip to content

Commit 9a88df0

Browse files
committed
Update orchestration based on rel-0.108.12
1 parent 5521660 commit 9a88df0

14 files changed

+556
-37
lines changed

orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyInput.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ public void setViolence(@Nullable final AzureThreshold violence) {
177177
* Set the promptShield of this {@link AzureContentSafetyInput} instance and return the same
178178
* instance.
179179
*
180-
* @param promptShield A flag to use prompt shield
180+
* @param promptShield Filter prompts for harmful content such as jailbreaks and prompt
181+
* injections.
181182
* @return The same instance of this {@link AzureContentSafetyInput} class
182183
*/
183184
@Nonnull
@@ -187,7 +188,7 @@ public AzureContentSafetyInput promptShield(@Nullable final Boolean promptShield
187188
}
188189

189190
/**
190-
* A flag to use prompt shield
191+
* Filter prompts for harmful content such as jailbreaks and prompt injections.
191192
*
192193
* @return promptShield The promptShield of this {@link AzureContentSafetyInput} instance.
193194
*/
@@ -199,7 +200,8 @@ public Boolean isPromptShield() {
199200
/**
200201
* Set the promptShield of this {@link AzureContentSafetyInput} instance.
201202
*
202-
* @param promptShield A flag to use prompt shield
203+
* @param promptShield Filter prompts for harmful content such as jailbreaks and prompt
204+
* injections.
203205
*/
204206
public void setPromptShield(@Nullable final Boolean promptShield) {
205207
this.promptShield = promptShield;

orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/AzureContentSafetyOutput.java

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public class AzureContentSafetyOutput
4040
@JsonProperty("violence")
4141
private AzureThreshold violence;
4242

43+
@JsonProperty("protected_material_code")
44+
private Boolean protectedMaterialCode = false;
45+
4346
@JsonAnySetter @JsonAnyGetter
4447
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
4548

@@ -172,6 +175,45 @@ public void setViolence(@Nullable final AzureThreshold violence) {
172175
this.violence = violence;
173176
}
174177

178+
/**
179+
* Set the protectedMaterialCode of this {@link AzureContentSafetyOutput} instance and return the
180+
* same instance.
181+
*
182+
* @param protectedMaterialCode Detect protected code content from known GitHub repositories. The
183+
* scan includes software libraries, source code, algorithms, and other proprietary
184+
* programming content.
185+
* @return The same instance of this {@link AzureContentSafetyOutput} class
186+
*/
187+
@Nonnull
188+
public AzureContentSafetyOutput protectedMaterialCode(
189+
@Nullable final Boolean protectedMaterialCode) {
190+
this.protectedMaterialCode = protectedMaterialCode;
191+
return this;
192+
}
193+
194+
/**
195+
* Detect protected code content from known GitHub repositories. The scan includes software
196+
* libraries, source code, algorithms, and other proprietary programming content.
197+
*
198+
* @return protectedMaterialCode The protectedMaterialCode of this {@link
199+
* AzureContentSafetyOutput} instance.
200+
*/
201+
@Nonnull
202+
public Boolean isProtectedMaterialCode() {
203+
return protectedMaterialCode;
204+
}
205+
206+
/**
207+
* Set the protectedMaterialCode of this {@link AzureContentSafetyOutput} instance.
208+
*
209+
* @param protectedMaterialCode Detect protected code content from known GitHub repositories. The
210+
* scan includes software libraries, source code, algorithms, and other proprietary
211+
* programming content.
212+
*/
213+
public void setProtectedMaterialCode(@Nullable final Boolean protectedMaterialCode) {
214+
this.protectedMaterialCode = protectedMaterialCode;
215+
}
216+
175217
/**
176218
* Get the names of the unrecognizable properties of the {@link AzureContentSafetyOutput}.
177219
*
@@ -215,6 +257,8 @@ public Map<String, Object> toMap() {
215257
if (selfHarm != null) declaredFields.put("selfHarm", selfHarm);
216258
if (sexual != null) declaredFields.put("sexual", sexual);
217259
if (violence != null) declaredFields.put("violence", violence);
260+
if (protectedMaterialCode != null)
261+
declaredFields.put("protectedMaterialCode", protectedMaterialCode);
218262
return declaredFields;
219263
}
220264

@@ -243,12 +287,15 @@ public boolean equals(@Nullable final java.lang.Object o) {
243287
&& Objects.equals(this.hate, azureContentSafetyOutput.hate)
244288
&& Objects.equals(this.selfHarm, azureContentSafetyOutput.selfHarm)
245289
&& Objects.equals(this.sexual, azureContentSafetyOutput.sexual)
246-
&& Objects.equals(this.violence, azureContentSafetyOutput.violence);
290+
&& Objects.equals(this.violence, azureContentSafetyOutput.violence)
291+
&& Objects.equals(
292+
this.protectedMaterialCode, azureContentSafetyOutput.protectedMaterialCode);
247293
}
248294

249295
@Override
250296
public int hashCode() {
251-
return Objects.hash(hate, selfHarm, sexual, violence, cloudSdkCustomFields);
297+
return Objects.hash(
298+
hate, selfHarm, sexual, violence, protectedMaterialCode, cloudSdkCustomFields);
252299
}
253300

254301
@Override
@@ -260,6 +307,9 @@ public String toString() {
260307
sb.append(" selfHarm: ").append(toIndentedString(selfHarm)).append("\n");
261308
sb.append(" sexual: ").append(toIndentedString(sexual)).append("\n");
262309
sb.append(" violence: ").append(toIndentedString(violence)).append("\n");
310+
sb.append(" protectedMaterialCode: ")
311+
.append(toIndentedString(protectedMaterialCode))
312+
.append("\n");
263313
cloudSdkCustomFields.forEach(
264314
(k, v) ->
265315
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));

orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/CompletionPostResponse.java

Lines changed: 66 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
import com.fasterxml.jackson.annotation.JsonAnySetter;
1616
import com.fasterxml.jackson.annotation.JsonIgnore;
1717
import com.fasterxml.jackson.annotation.JsonProperty;
18+
import java.util.ArrayList;
1819
import java.util.LinkedHashMap;
20+
import java.util.List;
1921
import java.util.Map;
2022
import java.util.NoSuchElementException;
2123
import java.util.Objects;
@@ -37,6 +39,9 @@ public class CompletionPostResponse
3739
@JsonProperty("final_result")
3840
private LLMModuleResult finalResult;
3941

42+
@JsonProperty("intermediate_failures")
43+
private List<Error> intermediateFailures = new ArrayList<>();
44+
4045
@JsonAnySetter @JsonAnyGetter
4146
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
4247

@@ -140,6 +145,58 @@ public void setFinalResult(@Nonnull final LLMModuleResult finalResult) {
140145
this.finalResult = finalResult;
141146
}
142147

148+
/**
149+
* Set the intermediateFailures of this {@link CompletionPostResponse} instance and return the
150+
* same instance.
151+
*
152+
* @param intermediateFailures List of errors encountered during processing for unsuccessful
153+
* modules configurations
154+
* @return The same instance of this {@link CompletionPostResponse} class
155+
*/
156+
@Nonnull
157+
public CompletionPostResponse intermediateFailures(
158+
@Nullable final List<Error> intermediateFailures) {
159+
this.intermediateFailures = intermediateFailures;
160+
return this;
161+
}
162+
163+
/**
164+
* Add one intermediateFailures instance to this {@link CompletionPostResponse}.
165+
*
166+
* @param intermediateFailuresItem The intermediateFailures that should be added
167+
* @return The same instance of type {@link CompletionPostResponse}
168+
*/
169+
@Nonnull
170+
public CompletionPostResponse addIntermediateFailuresItem(
171+
@Nonnull final Error intermediateFailuresItem) {
172+
if (this.intermediateFailures == null) {
173+
this.intermediateFailures = new ArrayList<>();
174+
}
175+
this.intermediateFailures.add(intermediateFailuresItem);
176+
return this;
177+
}
178+
179+
/**
180+
* List of errors encountered during processing for unsuccessful modules configurations
181+
*
182+
* @return intermediateFailures The intermediateFailures of this {@link CompletionPostResponse}
183+
* instance.
184+
*/
185+
@Nonnull
186+
public List<Error> getIntermediateFailures() {
187+
return intermediateFailures;
188+
}
189+
190+
/**
191+
* Set the intermediateFailures of this {@link CompletionPostResponse} instance.
192+
*
193+
* @param intermediateFailures List of errors encountered during processing for unsuccessful
194+
* modules configurations
195+
*/
196+
public void setIntermediateFailures(@Nullable final List<Error> intermediateFailures) {
197+
this.intermediateFailures = intermediateFailures;
198+
}
199+
143200
/**
144201
* Get the names of the unrecognizable properties of the {@link CompletionPostResponse}.
145202
*
@@ -182,6 +239,8 @@ public Map<String, Object> toMap() {
182239
if (requestId != null) declaredFields.put("requestId", requestId);
183240
if (intermediateResults != null) declaredFields.put("intermediateResults", intermediateResults);
184241
if (finalResult != null) declaredFields.put("finalResult", finalResult);
242+
if (intermediateFailures != null)
243+
declaredFields.put("intermediateFailures", intermediateFailures);
185244
return declaredFields;
186245
}
187246

@@ -209,12 +268,14 @@ public boolean equals(@Nullable final java.lang.Object o) {
209268
return Objects.equals(this.cloudSdkCustomFields, completionPostResponse.cloudSdkCustomFields)
210269
&& Objects.equals(this.requestId, completionPostResponse.requestId)
211270
&& Objects.equals(this.intermediateResults, completionPostResponse.intermediateResults)
212-
&& Objects.equals(this.finalResult, completionPostResponse.finalResult);
271+
&& Objects.equals(this.finalResult, completionPostResponse.finalResult)
272+
&& Objects.equals(this.intermediateFailures, completionPostResponse.intermediateFailures);
213273
}
214274

215275
@Override
216276
public int hashCode() {
217-
return Objects.hash(requestId, intermediateResults, finalResult, cloudSdkCustomFields);
277+
return Objects.hash(
278+
requestId, intermediateResults, finalResult, intermediateFailures, cloudSdkCustomFields);
218279
}
219280

220281
@Override
@@ -227,6 +288,9 @@ public String toString() {
227288
.append(toIndentedString(intermediateResults))
228289
.append("\n");
229290
sb.append(" finalResult: ").append(toIndentedString(finalResult)).append("\n");
291+
sb.append(" intermediateFailures: ")
292+
.append(toIndentedString(intermediateFailures))
293+
.append("\n");
230294
cloudSdkCustomFields.forEach(
231295
(k, v) ->
232296
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));

orchestration/src/main/java/com/sap/ai/sdk/orchestration/model/CompletionPostResponseStreaming.java

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
import com.fasterxml.jackson.annotation.JsonAnySetter;
1616
import com.fasterxml.jackson.annotation.JsonIgnore;
1717
import com.fasterxml.jackson.annotation.JsonProperty;
18+
import java.util.ArrayList;
1819
import java.util.LinkedHashMap;
20+
import java.util.List;
1921
import java.util.Map;
2022
import java.util.NoSuchElementException;
2123
import java.util.Objects;
@@ -37,6 +39,9 @@ public class CompletionPostResponseStreaming
3739
@JsonProperty("final_result")
3840
private LLMModuleResultStreaming finalResult;
3941

42+
@JsonProperty("intermediate_failures")
43+
private List<ErrorStreaming> intermediateFailures = new ArrayList<>();
44+
4045
@JsonAnySetter @JsonAnyGetter
4146
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
4247

@@ -144,6 +149,58 @@ public void setFinalResult(@Nullable final LLMModuleResultStreaming finalResult)
144149
this.finalResult = finalResult;
145150
}
146151

152+
/**
153+
* Set the intermediateFailures of this {@link CompletionPostResponseStreaming} instance and
154+
* return the same instance.
155+
*
156+
* @param intermediateFailures List of errors encountered during processing for unsuccessful
157+
* modules configurations
158+
* @return The same instance of this {@link CompletionPostResponseStreaming} class
159+
*/
160+
@Nonnull
161+
public CompletionPostResponseStreaming intermediateFailures(
162+
@Nullable final List<ErrorStreaming> intermediateFailures) {
163+
this.intermediateFailures = intermediateFailures;
164+
return this;
165+
}
166+
167+
/**
168+
* Add one intermediateFailures instance to this {@link CompletionPostResponseStreaming}.
169+
*
170+
* @param intermediateFailuresItem The intermediateFailures that should be added
171+
* @return The same instance of type {@link CompletionPostResponseStreaming}
172+
*/
173+
@Nonnull
174+
public CompletionPostResponseStreaming addIntermediateFailuresItem(
175+
@Nonnull final ErrorStreaming intermediateFailuresItem) {
176+
if (this.intermediateFailures == null) {
177+
this.intermediateFailures = new ArrayList<>();
178+
}
179+
this.intermediateFailures.add(intermediateFailuresItem);
180+
return this;
181+
}
182+
183+
/**
184+
* List of errors encountered during processing for unsuccessful modules configurations
185+
*
186+
* @return intermediateFailures The intermediateFailures of this {@link
187+
* CompletionPostResponseStreaming} instance.
188+
*/
189+
@Nonnull
190+
public List<ErrorStreaming> getIntermediateFailures() {
191+
return intermediateFailures;
192+
}
193+
194+
/**
195+
* Set the intermediateFailures of this {@link CompletionPostResponseStreaming} instance.
196+
*
197+
* @param intermediateFailures List of errors encountered during processing for unsuccessful
198+
* modules configurations
199+
*/
200+
public void setIntermediateFailures(@Nullable final List<ErrorStreaming> intermediateFailures) {
201+
this.intermediateFailures = intermediateFailures;
202+
}
203+
147204
/**
148205
* Get the names of the unrecognizable properties of the {@link CompletionPostResponseStreaming}.
149206
*
@@ -187,6 +244,8 @@ public Map<String, Object> toMap() {
187244
if (requestId != null) declaredFields.put("requestId", requestId);
188245
if (intermediateResults != null) declaredFields.put("intermediateResults", intermediateResults);
189246
if (finalResult != null) declaredFields.put("finalResult", finalResult);
247+
if (intermediateFailures != null)
248+
declaredFields.put("intermediateFailures", intermediateFailures);
190249
return declaredFields;
191250
}
192251

@@ -218,12 +277,15 @@ public boolean equals(@Nullable final java.lang.Object o) {
218277
&& Objects.equals(this.requestId, completionPostResponseStreaming.requestId)
219278
&& Objects.equals(
220279
this.intermediateResults, completionPostResponseStreaming.intermediateResults)
221-
&& Objects.equals(this.finalResult, completionPostResponseStreaming.finalResult);
280+
&& Objects.equals(this.finalResult, completionPostResponseStreaming.finalResult)
281+
&& Objects.equals(
282+
this.intermediateFailures, completionPostResponseStreaming.intermediateFailures);
222283
}
223284

224285
@Override
225286
public int hashCode() {
226-
return Objects.hash(requestId, intermediateResults, finalResult, cloudSdkCustomFields);
287+
return Objects.hash(
288+
requestId, intermediateResults, finalResult, intermediateFailures, cloudSdkCustomFields);
227289
}
228290

229291
@Override
@@ -236,6 +298,9 @@ public String toString() {
236298
.append(toIndentedString(intermediateResults))
237299
.append("\n");
238300
sb.append(" finalResult: ").append(toIndentedString(finalResult)).append("\n");
301+
sb.append(" intermediateFailures: ")
302+
.append(toIndentedString(intermediateFailures))
303+
.append("\n");
239304
cloudSdkCustomFields.forEach(
240305
(k, v) ->
241306
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));

0 commit comments

Comments
 (0)