Skip to content

Commit 18b795b

Browse files
committed
Fix rearrangement of code
1 parent b38271d commit 18b795b

File tree

71 files changed

+1720
-1538
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1720
-1538
lines changed

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model2/ChatCompletionFunctionCall.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@
3737
public class ChatCompletionFunctionCall
3838
// CHECKSTYLE:ON
3939
{
40-
@JsonAnySetter @JsonAnyGetter
41-
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
4240
@JsonProperty("name")
4341
private String name;
42+
4443
@JsonProperty("arguments")
4544
private String arguments;
4645

46+
@JsonAnySetter @JsonAnyGetter
47+
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
48+
4749
/**
4850
* Set the name of this {@link ChatCompletionFunctionCall} instance and return the same instance.
4951
*

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model2/ChatCompletionFunctionCallOption.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@
3737
public class ChatCompletionFunctionCallOption
3838
// CHECKSTYLE:ON
3939
{
40-
@JsonAnySetter @JsonAnyGetter
41-
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
4240
@JsonProperty("name")
4341
private String name;
4442

43+
@JsonAnySetter @JsonAnyGetter
44+
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
45+
4546
/**
4647
* Set the name of this {@link ChatCompletionFunctionCallOption} instance and return the same
4748
* instance.

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model2/ChatCompletionFunctions.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,18 @@
4040
public class ChatCompletionFunctions
4141
// CHECKSTYLE:ON
4242
{
43-
@JsonAnySetter @JsonAnyGetter
44-
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
4543
@JsonProperty("description")
4644
private String description;
45+
4746
@JsonProperty("name")
4847
private String name;
48+
4949
@JsonProperty("parameters")
5050
private Map<String, Object> parameters = new HashMap<>();
5151

52+
@JsonAnySetter @JsonAnyGetter
53+
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
54+
5255
/**
5356
* Set the description of this {@link ChatCompletionFunctions} instance and return the same
5457
* instance.

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model2/ChatCompletionMessageToolCall.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,18 @@
3434
public class ChatCompletionMessageToolCall
3535
// CHECKSTYLE:ON
3636
{
37-
@JsonAnySetter @JsonAnyGetter
38-
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
3937
@JsonProperty("id")
4038
private String id;
39+
4140
@JsonProperty("type")
4241
private ToolCallType type;
42+
4343
@JsonProperty("function")
4444
private ChatCompletionMessageToolCallFunction function;
4545

46+
@JsonAnySetter @JsonAnyGetter
47+
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
48+
4649
/**
4750
* Set the id of this {@link ChatCompletionMessageToolCall} instance and return the same instance.
4851
*

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model2/ChatCompletionMessageToolCallChunk.java

Lines changed: 56 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,72 @@
3636
public class ChatCompletionMessageToolCallChunk
3737
// CHECKSTYLE:ON
3838
{
39-
@JsonAnySetter @JsonAnyGetter
40-
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
4139
@JsonProperty("index")
4240
private Integer index;
41+
4342
@JsonProperty("id")
4443
private String id;
44+
45+
/** The type of the tool. Currently, only &#x60;function&#x60; is supported. */
46+
public enum TypeEnum {
47+
/** The FUNCTION option of this ChatCompletionMessageToolCallChunk */
48+
FUNCTION("function");
49+
50+
private String value;
51+
52+
TypeEnum(String value) {
53+
this.value = value;
54+
}
55+
56+
/**
57+
* Get the value of the enum
58+
*
59+
* @return The enum value
60+
*/
61+
@JsonValue
62+
@Nonnull
63+
public String getValue() {
64+
return value;
65+
}
66+
67+
/**
68+
* Get the String value of the enum value.
69+
*
70+
* @return The enum value as String
71+
*/
72+
@Override
73+
@Nonnull
74+
public String toString() {
75+
return String.valueOf(value);
76+
}
77+
78+
/**
79+
* Get the enum value from a String value
80+
*
81+
* @param value The String value
82+
* @return The enum value of type ChatCompletionMessageToolCallChunk
83+
*/
84+
@JsonCreator
85+
@Nonnull
86+
public static TypeEnum fromValue(@Nonnull final String value) {
87+
for (TypeEnum b : TypeEnum.values()) {
88+
if (b.value.equals(value)) {
89+
return b;
90+
}
91+
}
92+
throw new IllegalArgumentException("Unexpected value '" + value + "'");
93+
}
94+
}
95+
4596
@JsonProperty("type")
4697
private TypeEnum type;
4798

4899
@JsonProperty("function")
49100
private ChatCompletionMessageToolCallChunkFunction function;
50101

102+
@JsonAnySetter @JsonAnyGetter
103+
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
104+
51105
/**
52106
* Set the index of this {@link ChatCompletionMessageToolCallChunk} instance and return the same
53107
* instance.
@@ -267,55 +321,4 @@ private String toIndentedString(final Object o) {
267321
}
268322
return o.toString().replace("\n", "\n ");
269323
}
270-
271-
/** The type of the tool. Currently, only &#x60;function&#x60; is supported. */
272-
public enum TypeEnum {
273-
/** The FUNCTION option of this ChatCompletionMessageToolCallChunk */
274-
FUNCTION("function");
275-
276-
private String value;
277-
278-
TypeEnum(String value) {
279-
this.value = value;
280-
}
281-
282-
/**
283-
* Get the enum value from a String value
284-
*
285-
* @param value The String value
286-
* @return The enum value of type ChatCompletionMessageToolCallChunk
287-
*/
288-
@JsonCreator
289-
@Nonnull
290-
public static TypeEnum fromValue(@Nonnull final String value) {
291-
for (TypeEnum b : TypeEnum.values()) {
292-
if (b.value.equals(value)) {
293-
return b;
294-
}
295-
}
296-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
297-
}
298-
299-
/**
300-
* Get the value of the enum
301-
*
302-
* @return The enum value
303-
*/
304-
@JsonValue
305-
@Nonnull
306-
public String getValue() {
307-
return value;
308-
}
309-
310-
/**
311-
* Get the String value of the enum value.
312-
*
313-
* @return The enum value as String
314-
*/
315-
@Override
316-
@Nonnull
317-
public String toString() {
318-
return String.valueOf(value);
319-
}
320-
}
321324
}

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model2/ChatCompletionMessageToolCallChunkFunction.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@
3434
public class ChatCompletionMessageToolCallChunkFunction
3535
// CHECKSTYLE:ON
3636
{
37-
@JsonAnySetter @JsonAnyGetter
38-
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
3937
@JsonProperty("name")
4038
private String name;
39+
4140
@JsonProperty("arguments")
4241
private String arguments;
4342

43+
@JsonAnySetter @JsonAnyGetter
44+
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
45+
4446
/**
4547
* Set the name of this {@link ChatCompletionMessageToolCallChunkFunction} instance and return the
4648
* same instance.

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model2/ChatCompletionMessageToolCallFunction.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@
3434
public class ChatCompletionMessageToolCallFunction
3535
// CHECKSTYLE:ON
3636
{
37-
@JsonAnySetter @JsonAnyGetter
38-
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
3937
@JsonProperty("name")
4038
private String name;
39+
4140
@JsonProperty("arguments")
4241
private String arguments;
4342

43+
@JsonAnySetter @JsonAnyGetter
44+
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
45+
4446
/**
4547
* Set the name of this {@link ChatCompletionMessageToolCallFunction} instance and return the same
4648
* instance.

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model2/ChatCompletionNamedToolChoice.java

Lines changed: 54 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,66 @@
3636
public class ChatCompletionNamedToolChoice
3737
// CHECKSTYLE:ON
3838
{
39-
@JsonAnySetter @JsonAnyGetter
40-
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
39+
/** The type of the tool. Currently, only &#x60;function&#x60; is supported. */
40+
public enum TypeEnum {
41+
/** The FUNCTION option of this ChatCompletionNamedToolChoice */
42+
FUNCTION("function");
43+
44+
private String value;
45+
46+
TypeEnum(String value) {
47+
this.value = value;
48+
}
49+
50+
/**
51+
* Get the value of the enum
52+
*
53+
* @return The enum value
54+
*/
55+
@JsonValue
56+
@Nonnull
57+
public String getValue() {
58+
return value;
59+
}
60+
61+
/**
62+
* Get the String value of the enum value.
63+
*
64+
* @return The enum value as String
65+
*/
66+
@Override
67+
@Nonnull
68+
public String toString() {
69+
return String.valueOf(value);
70+
}
71+
72+
/**
73+
* Get the enum value from a String value
74+
*
75+
* @param value The String value
76+
* @return The enum value of type ChatCompletionNamedToolChoice
77+
*/
78+
@JsonCreator
79+
@Nonnull
80+
public static TypeEnum fromValue(@Nonnull final String value) {
81+
for (TypeEnum b : TypeEnum.values()) {
82+
if (b.value.equals(value)) {
83+
return b;
84+
}
85+
}
86+
throw new IllegalArgumentException("Unexpected value '" + value + "'");
87+
}
88+
}
89+
4190
@JsonProperty("type")
4291
private TypeEnum type;
4392

4493
@JsonProperty("function")
4594
private ChatCompletionNamedToolChoiceFunction function;
4695

96+
@JsonAnySetter @JsonAnyGetter
97+
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
98+
4799
/**
48100
* Set the type of this {@link ChatCompletionNamedToolChoice} instance and return the same
49101
* instance.
@@ -194,55 +246,4 @@ private String toIndentedString(final Object o) {
194246
}
195247
return o.toString().replace("\n", "\n ");
196248
}
197-
198-
/** The type of the tool. Currently, only &#x60;function&#x60; is supported. */
199-
public enum TypeEnum {
200-
/** The FUNCTION option of this ChatCompletionNamedToolChoice */
201-
FUNCTION("function");
202-
203-
private String value;
204-
205-
TypeEnum(String value) {
206-
this.value = value;
207-
}
208-
209-
/**
210-
* Get the enum value from a String value
211-
*
212-
* @param value The String value
213-
* @return The enum value of type ChatCompletionNamedToolChoice
214-
*/
215-
@JsonCreator
216-
@Nonnull
217-
public static TypeEnum fromValue(@Nonnull final String value) {
218-
for (TypeEnum b : TypeEnum.values()) {
219-
if (b.value.equals(value)) {
220-
return b;
221-
}
222-
}
223-
throw new IllegalArgumentException("Unexpected value '" + value + "'");
224-
}
225-
226-
/**
227-
* Get the value of the enum
228-
*
229-
* @return The enum value
230-
*/
231-
@JsonValue
232-
@Nonnull
233-
public String getValue() {
234-
return value;
235-
}
236-
237-
/**
238-
* Get the String value of the enum value.
239-
*
240-
* @return The enum value as String
241-
*/
242-
@Override
243-
@Nonnull
244-
public String toString() {
245-
return String.valueOf(value);
246-
}
247-
}
248249
}

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/model2/ChatCompletionNamedToolChoiceFunction.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@
3434
public class ChatCompletionNamedToolChoiceFunction
3535
// CHECKSTYLE:ON
3636
{
37-
@JsonAnySetter @JsonAnyGetter
38-
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
3937
@JsonProperty("name")
4038
private String name;
4139

40+
@JsonAnySetter @JsonAnyGetter
41+
private final Map<String, Object> cloudSdkCustomFields = new LinkedHashMap<>();
42+
4243
/**
4344
* Set the name of this {@link ChatCompletionNamedToolChoiceFunction} instance and return the same
4445
* instance.

0 commit comments

Comments
 (0)