Skip to content

Commit a872b6d

Browse files
committed
Update orchestration based on rel/0.92.5
1 parent bb6b946 commit a872b6d

File tree

3 files changed

+190
-5
lines changed

3 files changed

+190
-5
lines changed

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

Lines changed: 83 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ public class EmbeddingsModelDetails
3737
@JsonProperty("params")
3838
private EmbeddingsModelParams params;
3939

40+
@JsonProperty("timeout")
41+
private Integer timeout = 600;
42+
43+
@JsonProperty("max_retries")
44+
private Integer maxRetries = 2;
45+
4046
@JsonAnySetter @JsonAnyGetter
4147
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
4248

@@ -136,6 +142,75 @@ public void setParams(@Nullable final EmbeddingsModelParams params) {
136142
this.params = params;
137143
}
138144

145+
/**
146+
* Set the timeout of this {@link EmbeddingsModelDetails} instance and return the same instance.
147+
*
148+
* @param timeout Timeout for the Embeddings request in seconds. This parameter is currently
149+
* ignored for Vertex AI models. Minimum: 1 Maximum: 600
150+
* @return The same instance of this {@link EmbeddingsModelDetails} class
151+
*/
152+
@Nonnull
153+
public EmbeddingsModelDetails timeout(@Nullable final Integer timeout) {
154+
this.timeout = timeout;
155+
return this;
156+
}
157+
158+
/**
159+
* Timeout for the Embeddings request in seconds. This parameter is currently ignored for Vertex
160+
* AI models. minimum: 1 maximum: 600
161+
*
162+
* @return timeout The timeout of this {@link EmbeddingsModelDetails} instance.
163+
*/
164+
@Nonnull
165+
public Integer getTimeout() {
166+
return timeout;
167+
}
168+
169+
/**
170+
* Set the timeout of this {@link EmbeddingsModelDetails} instance.
171+
*
172+
* @param timeout Timeout for the Embeddings request in seconds. This parameter is currently
173+
* ignored for Vertex AI models. Minimum: 1 Maximum: 600
174+
*/
175+
public void setTimeout(@Nullable final Integer timeout) {
176+
this.timeout = timeout;
177+
}
178+
179+
/**
180+
* Set the maxRetries of this {@link EmbeddingsModelDetails} instance and return the same
181+
* instance.
182+
*
183+
* @param maxRetries Maximum number of retries for the Embeddings request. This parameter is
184+
* currently ignored for Vertex AI models. Minimum: 0 Maximum: 5
185+
* @return The same instance of this {@link EmbeddingsModelDetails} class
186+
*/
187+
@Nonnull
188+
public EmbeddingsModelDetails maxRetries(@Nullable final Integer maxRetries) {
189+
this.maxRetries = maxRetries;
190+
return this;
191+
}
192+
193+
/**
194+
* Maximum number of retries for the Embeddings request. This parameter is currently ignored for
195+
* Vertex AI models. minimum: 0 maximum: 5
196+
*
197+
* @return maxRetries The maxRetries of this {@link EmbeddingsModelDetails} instance.
198+
*/
199+
@Nonnull
200+
public Integer getMaxRetries() {
201+
return maxRetries;
202+
}
203+
204+
/**
205+
* Set the maxRetries of this {@link EmbeddingsModelDetails} instance.
206+
*
207+
* @param maxRetries Maximum number of retries for the Embeddings request. This parameter is
208+
* currently ignored for Vertex AI models. Minimum: 0 Maximum: 5
209+
*/
210+
public void setMaxRetries(@Nullable final Integer maxRetries) {
211+
this.maxRetries = maxRetries;
212+
}
213+
139214
/**
140215
* Get the names of the unrecognizable properties of the {@link EmbeddingsModelDetails}.
141216
*
@@ -178,6 +253,8 @@ public Map<String, Object> toMap() {
178253
if (name != null) declaredFields.put("name", name);
179254
if (version != null) declaredFields.put("version", version);
180255
if (params != null) declaredFields.put("params", params);
256+
if (timeout != null) declaredFields.put("timeout", timeout);
257+
if (maxRetries != null) declaredFields.put("maxRetries", maxRetries);
181258
return declaredFields;
182259
}
183260

@@ -205,12 +282,14 @@ public boolean equals(@Nullable final java.lang.Object o) {
205282
return Objects.equals(this.cloudSdkCustomFields, embeddingsModelDetails.cloudSdkCustomFields)
206283
&& Objects.equals(this.name, embeddingsModelDetails.name)
207284
&& Objects.equals(this.version, embeddingsModelDetails.version)
208-
&& Objects.equals(this.params, embeddingsModelDetails.params);
285+
&& Objects.equals(this.params, embeddingsModelDetails.params)
286+
&& Objects.equals(this.timeout, embeddingsModelDetails.timeout)
287+
&& Objects.equals(this.maxRetries, embeddingsModelDetails.maxRetries);
209288
}
210289

211290
@Override
212291
public int hashCode() {
213-
return Objects.hash(name, version, params, cloudSdkCustomFields);
292+
return Objects.hash(name, version, params, timeout, maxRetries, cloudSdkCustomFields);
214293
}
215294

216295
@Override
@@ -221,6 +300,8 @@ public String toString() {
221300
sb.append(" name: ").append(toIndentedString(name)).append("\n");
222301
sb.append(" version: ").append(toIndentedString(version)).append("\n");
223302
sb.append(" params: ").append(toIndentedString(params)).append("\n");
303+
sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n");
304+
sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n");
224305
cloudSdkCustomFields.forEach(
225306
(k, v) ->
226307
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));

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

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public class LLMModelDetails
4141
@JsonProperty("params")
4242
private Map<String, Object> params = new HashMap<>();
4343

44+
@JsonProperty("timeout")
45+
private Integer timeout = 600;
46+
47+
@JsonProperty("max_retries")
48+
private Integer maxRetries = 2;
49+
4450
@JsonAnySetter @JsonAnyGetter
4551
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
4652

@@ -159,6 +165,74 @@ public void setParams(@Nullable final Map<String, Object> params) {
159165
this.params = params;
160166
}
161167

168+
/**
169+
* Set the timeout of this {@link LLMModelDetails} instance and return the same instance.
170+
*
171+
* @param timeout Timeout for the LLM request in seconds. This parameter is currently ignored for
172+
* Vertex AI models. Minimum: 1 Maximum: 600
173+
* @return The same instance of this {@link LLMModelDetails} class
174+
*/
175+
@Nonnull
176+
public LLMModelDetails timeout(@Nullable final Integer timeout) {
177+
this.timeout = timeout;
178+
return this;
179+
}
180+
181+
/**
182+
* Timeout for the LLM request in seconds. This parameter is currently ignored for Vertex AI
183+
* models. minimum: 1 maximum: 600
184+
*
185+
* @return timeout The timeout of this {@link LLMModelDetails} instance.
186+
*/
187+
@Nonnull
188+
public Integer getTimeout() {
189+
return timeout;
190+
}
191+
192+
/**
193+
* Set the timeout of this {@link LLMModelDetails} instance.
194+
*
195+
* @param timeout Timeout for the LLM request in seconds. This parameter is currently ignored for
196+
* Vertex AI models. Minimum: 1 Maximum: 600
197+
*/
198+
public void setTimeout(@Nullable final Integer timeout) {
199+
this.timeout = timeout;
200+
}
201+
202+
/**
203+
* Set the maxRetries of this {@link LLMModelDetails} instance and return the same instance.
204+
*
205+
* @param maxRetries Maximum number of retries for the LLM request. This parameter is currently
206+
* ignored for Vertex AI models. Minimum: 0 Maximum: 5
207+
* @return The same instance of this {@link LLMModelDetails} class
208+
*/
209+
@Nonnull
210+
public LLMModelDetails maxRetries(@Nullable final Integer maxRetries) {
211+
this.maxRetries = maxRetries;
212+
return this;
213+
}
214+
215+
/**
216+
* Maximum number of retries for the LLM request. This parameter is currently ignored for Vertex
217+
* AI models. minimum: 0 maximum: 5
218+
*
219+
* @return maxRetries The maxRetries of this {@link LLMModelDetails} instance.
220+
*/
221+
@Nonnull
222+
public Integer getMaxRetries() {
223+
return maxRetries;
224+
}
225+
226+
/**
227+
* Set the maxRetries of this {@link LLMModelDetails} instance.
228+
*
229+
* @param maxRetries Maximum number of retries for the LLM request. This parameter is currently
230+
* ignored for Vertex AI models. Minimum: 0 Maximum: 5
231+
*/
232+
public void setMaxRetries(@Nullable final Integer maxRetries) {
233+
this.maxRetries = maxRetries;
234+
}
235+
162236
/**
163237
* Get the names of the unrecognizable properties of the {@link LLMModelDetails}.
164238
*
@@ -200,6 +274,8 @@ public Map<String, Object> toMap() {
200274
if (name != null) declaredFields.put("name", name);
201275
if (version != null) declaredFields.put("version", version);
202276
if (params != null) declaredFields.put("params", params);
277+
if (timeout != null) declaredFields.put("timeout", timeout);
278+
if (maxRetries != null) declaredFields.put("maxRetries", maxRetries);
203279
return declaredFields;
204280
}
205281

@@ -227,12 +303,14 @@ public boolean equals(@Nullable final java.lang.Object o) {
227303
return Objects.equals(this.cloudSdkCustomFields, llMModelDetails.cloudSdkCustomFields)
228304
&& Objects.equals(this.name, llMModelDetails.name)
229305
&& Objects.equals(this.version, llMModelDetails.version)
230-
&& Objects.equals(this.params, llMModelDetails.params);
306+
&& Objects.equals(this.params, llMModelDetails.params)
307+
&& Objects.equals(this.timeout, llMModelDetails.timeout)
308+
&& Objects.equals(this.maxRetries, llMModelDetails.maxRetries);
231309
}
232310

233311
@Override
234312
public int hashCode() {
235-
return Objects.hash(name, version, params, cloudSdkCustomFields);
313+
return Objects.hash(name, version, params, timeout, maxRetries, cloudSdkCustomFields);
236314
}
237315

238316
@Override
@@ -243,6 +321,8 @@ public String toString() {
243321
sb.append(" name: ").append(toIndentedString(name)).append("\n");
244322
sb.append(" version: ").append(toIndentedString(version)).append("\n");
245323
sb.append(" params: ").append(toIndentedString(params)).append("\n");
324+
sb.append(" timeout: ").append(toIndentedString(timeout)).append("\n");
325+
sb.append(" maxRetries: ").append(toIndentedString(maxRetries)).append("\n");
246326
cloudSdkCustomFields.forEach(
247327
(k, v) ->
248328
sb.append(" ").append(k).append(": ").append(toIndentedString(v)).append("\n"));

orchestration/src/main/resources/spec/orchestration.yaml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,19 @@ components:
173173
type: string
174174
default: "latest"
175175
params:
176-
$ref: "#/components/schemas/EmbeddingsModelParams"
176+
$ref: "#/components/schemas/EmbeddingsModelParams"
177+
timeout:
178+
description: Timeout for the Embeddings request in seconds. This parameter is currently ignored for Vertex AI models.
179+
type: integer
180+
default: 600
181+
minimum: 1
182+
maximum: 600
183+
max_retries:
184+
description: Maximum number of retries for the Embeddings request. This parameter is currently ignored for Vertex AI models.
185+
type: integer
186+
default: 2
187+
minimum: 0
188+
maximum: 5
177189
EmbeddingsModelParams:
178190
type: object
179191
description: Additional parameters for generating input's embeddings. Default values are used for mandatory parameters.
@@ -828,6 +840,18 @@ components:
828840
n: 2
829841
stream_options:
830842
include_usage: true
843+
timeout:
844+
description: Timeout for the LLM request in seconds. This parameter is currently ignored for Vertex AI models.
845+
type: integer
846+
default: 600
847+
minimum: 1
848+
maximum: 600
849+
max_retries:
850+
description: Maximum number of retries for the LLM request. This parameter is currently ignored for Vertex AI models.
851+
type: integer
852+
default: 2
853+
minimum: 0
854+
maximum: 5
831855

832856
# --- Templating Module with User Defined Template ---
833857
# response_format api definition taken from: https://github.com/openai/openai-openapi/blob/e0cb2d721753e13e69e918465795d6e9f87ab15a/openapi.yaml#L12286

0 commit comments

Comments
 (0)