File tree Expand file tree Collapse file tree 14 files changed +140
-28
lines changed
openai-java-core/src/main/kotlin/com/openai/models Expand file tree Collapse file tree 14 files changed +140
-28
lines changed Original file line number Diff line number Diff line change @@ -183,18 +183,26 @@ constructor(
183
183
184
184
fun additionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) = apply {
185
185
this .additionalBodyProperties.clear()
186
- this .additionalBodyProperties.putAll (additionalBodyProperties)
186
+ putAllAdditionalBodyProperties (additionalBodyProperties)
187
187
}
188
188
189
189
fun putAdditionalBodyProperty (key : String , value : JsonValue ) = apply {
190
- this . additionalBodyProperties.put(key, value)
190
+ additionalBodyProperties.put(key, value)
191
191
}
192
192
193
193
fun putAllAdditionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) =
194
194
apply {
195
195
this .additionalBodyProperties.putAll(additionalBodyProperties)
196
196
}
197
197
198
+ fun removeAdditionalBodyProperty (key : String ) = apply {
199
+ additionalBodyProperties.remove(key)
200
+ }
201
+
202
+ fun removeAllAdditionalBodyProperties (keys : Set <String >) = apply {
203
+ keys.forEach(::removeAdditionalBodyProperty)
204
+ }
205
+
198
206
fun build (): BatchCancelParams =
199
207
BatchCancelParams (
200
208
checkNotNull(batchId) { " `batchId` is required but was not set" },
Original file line number Diff line number Diff line change @@ -389,18 +389,26 @@ constructor(
389
389
390
390
fun additionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) = apply {
391
391
this .additionalBodyProperties.clear()
392
- this .additionalBodyProperties.putAll (additionalBodyProperties)
392
+ putAllAdditionalBodyProperties (additionalBodyProperties)
393
393
}
394
394
395
395
fun putAdditionalBodyProperty (key : String , value : JsonValue ) = apply {
396
- this . additionalBodyProperties.put(key, value)
396
+ additionalBodyProperties.put(key, value)
397
397
}
398
398
399
399
fun putAllAdditionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) =
400
400
apply {
401
401
this .additionalBodyProperties.putAll(additionalBodyProperties)
402
402
}
403
403
404
+ fun removeAdditionalBodyProperty (key : String ) = apply {
405
+ additionalBodyProperties.remove(key)
406
+ }
407
+
408
+ fun removeAllAdditionalBodyProperties (keys : Set <String >) = apply {
409
+ keys.forEach(::removeAdditionalBodyProperty)
410
+ }
411
+
404
412
fun build (): BatchCreateParams =
405
413
BatchCreateParams (
406
414
checkNotNull(completionWindow) { " `completionWindow` is required but was not set" },
Original file line number Diff line number Diff line change @@ -1553,18 +1553,26 @@ constructor(
1553
1553
1554
1554
fun additionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) = apply {
1555
1555
this .additionalBodyProperties.clear()
1556
- this .additionalBodyProperties.putAll (additionalBodyProperties)
1556
+ putAllAdditionalBodyProperties (additionalBodyProperties)
1557
1557
}
1558
1558
1559
1559
fun putAdditionalBodyProperty (key : String , value : JsonValue ) = apply {
1560
- this . additionalBodyProperties.put(key, value)
1560
+ additionalBodyProperties.put(key, value)
1561
1561
}
1562
1562
1563
1563
fun putAllAdditionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) =
1564
1564
apply {
1565
1565
this .additionalBodyProperties.putAll(additionalBodyProperties)
1566
1566
}
1567
1567
1568
+ fun removeAdditionalBodyProperty (key : String ) = apply {
1569
+ additionalBodyProperties.remove(key)
1570
+ }
1571
+
1572
+ fun removeAllAdditionalBodyProperties (keys : Set <String >) = apply {
1573
+ keys.forEach(::removeAdditionalBodyProperty)
1574
+ }
1575
+
1568
1576
fun build (): ChatCompletionCreateParams =
1569
1577
ChatCompletionCreateParams (
1570
1578
checkNotNull(messages) { " `messages` is required but was not set" }.toImmutable(),
Original file line number Diff line number Diff line change @@ -967,18 +967,26 @@ constructor(
967
967
968
968
fun additionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) = apply {
969
969
this .additionalBodyProperties.clear()
970
- this .additionalBodyProperties.putAll (additionalBodyProperties)
970
+ putAllAdditionalBodyProperties (additionalBodyProperties)
971
971
}
972
972
973
973
fun putAdditionalBodyProperty (key : String , value : JsonValue ) = apply {
974
- this . additionalBodyProperties.put(key, value)
974
+ additionalBodyProperties.put(key, value)
975
975
}
976
976
977
977
fun putAllAdditionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) =
978
978
apply {
979
979
this .additionalBodyProperties.putAll(additionalBodyProperties)
980
980
}
981
981
982
+ fun removeAdditionalBodyProperty (key : String ) = apply {
983
+ additionalBodyProperties.remove(key)
984
+ }
985
+
986
+ fun removeAllAdditionalBodyProperties (keys : Set <String >) = apply {
987
+ keys.forEach(::removeAdditionalBodyProperty)
988
+ }
989
+
982
990
fun build (): CompletionCreateParams =
983
991
CompletionCreateParams (
984
992
checkNotNull(model) { " `model` is required but was not set" },
Original file line number Diff line number Diff line change @@ -489,18 +489,26 @@ constructor(
489
489
490
490
fun additionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) = apply {
491
491
this .additionalBodyProperties.clear()
492
- this .additionalBodyProperties.putAll (additionalBodyProperties)
492
+ putAllAdditionalBodyProperties (additionalBodyProperties)
493
493
}
494
494
495
495
fun putAdditionalBodyProperty (key : String , value : JsonValue ) = apply {
496
- this . additionalBodyProperties.put(key, value)
496
+ additionalBodyProperties.put(key, value)
497
497
}
498
498
499
499
fun putAllAdditionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) =
500
500
apply {
501
501
this .additionalBodyProperties.putAll(additionalBodyProperties)
502
502
}
503
503
504
+ fun removeAdditionalBodyProperty (key : String ) = apply {
505
+ additionalBodyProperties.remove(key)
506
+ }
507
+
508
+ fun removeAllAdditionalBodyProperties (keys : Set <String >) = apply {
509
+ keys.forEach(::removeAdditionalBodyProperty)
510
+ }
511
+
504
512
fun build (): EmbeddingCreateParams =
505
513
EmbeddingCreateParams (
506
514
checkNotNull(input) { " `input` is required but was not set" },
Original file line number Diff line number Diff line change @@ -183,18 +183,26 @@ constructor(
183
183
184
184
fun additionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) = apply {
185
185
this .additionalBodyProperties.clear()
186
- this .additionalBodyProperties.putAll (additionalBodyProperties)
186
+ putAllAdditionalBodyProperties (additionalBodyProperties)
187
187
}
188
188
189
189
fun putAdditionalBodyProperty (key : String , value : JsonValue ) = apply {
190
- this . additionalBodyProperties.put(key, value)
190
+ additionalBodyProperties.put(key, value)
191
191
}
192
192
193
193
fun putAllAdditionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) =
194
194
apply {
195
195
this .additionalBodyProperties.putAll(additionalBodyProperties)
196
196
}
197
197
198
+ fun removeAdditionalBodyProperty (key : String ) = apply {
199
+ additionalBodyProperties.remove(key)
200
+ }
201
+
202
+ fun removeAllAdditionalBodyProperties (keys : Set <String >) = apply {
203
+ keys.forEach(::removeAdditionalBodyProperty)
204
+ }
205
+
198
206
fun build (): FileDeleteParams =
199
207
FileDeleteParams (
200
208
checkNotNull(fileId) { " `fileId` is required but was not set" },
Original file line number Diff line number Diff line change @@ -185,18 +185,26 @@ constructor(
185
185
186
186
fun additionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) = apply {
187
187
this .additionalBodyProperties.clear()
188
- this .additionalBodyProperties.putAll (additionalBodyProperties)
188
+ putAllAdditionalBodyProperties (additionalBodyProperties)
189
189
}
190
190
191
191
fun putAdditionalBodyProperty (key : String , value : JsonValue ) = apply {
192
- this . additionalBodyProperties.put(key, value)
192
+ additionalBodyProperties.put(key, value)
193
193
}
194
194
195
195
fun putAllAdditionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) =
196
196
apply {
197
197
this .additionalBodyProperties.putAll(additionalBodyProperties)
198
198
}
199
199
200
+ fun removeAdditionalBodyProperty (key : String ) = apply {
201
+ additionalBodyProperties.remove(key)
202
+ }
203
+
204
+ fun removeAllAdditionalBodyProperties (keys : Set <String >) = apply {
205
+ keys.forEach(::removeAdditionalBodyProperty)
206
+ }
207
+
200
208
fun build (): FineTuningJobCancelParams =
201
209
FineTuningJobCancelParams (
202
210
checkNotNull(fineTuningJobId) { " `fineTuningJobId` is required but was not set" },
Original file line number Diff line number Diff line change @@ -540,18 +540,26 @@ constructor(
540
540
541
541
fun additionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) = apply {
542
542
this .additionalBodyProperties.clear()
543
- this .additionalBodyProperties.putAll (additionalBodyProperties)
543
+ putAllAdditionalBodyProperties (additionalBodyProperties)
544
544
}
545
545
546
546
fun putAdditionalBodyProperty (key : String , value : JsonValue ) = apply {
547
- this . additionalBodyProperties.put(key, value)
547
+ additionalBodyProperties.put(key, value)
548
548
}
549
549
550
550
fun putAllAdditionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) =
551
551
apply {
552
552
this .additionalBodyProperties.putAll(additionalBodyProperties)
553
553
}
554
554
555
+ fun removeAdditionalBodyProperty (key : String ) = apply {
556
+ additionalBodyProperties.remove(key)
557
+ }
558
+
559
+ fun removeAllAdditionalBodyProperties (keys : Set <String >) = apply {
560
+ keys.forEach(::removeAdditionalBodyProperty)
561
+ }
562
+
555
563
fun build (): FineTuningJobCreateParams =
556
564
FineTuningJobCreateParams (
557
565
checkNotNull(model) { " `model` is required but was not set" },
Original file line number Diff line number Diff line change @@ -497,18 +497,26 @@ constructor(
497
497
498
498
fun additionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) = apply {
499
499
this .additionalBodyProperties.clear()
500
- this .additionalBodyProperties.putAll (additionalBodyProperties)
500
+ putAllAdditionalBodyProperties (additionalBodyProperties)
501
501
}
502
502
503
503
fun putAdditionalBodyProperty (key : String , value : JsonValue ) = apply {
504
- this . additionalBodyProperties.put(key, value)
504
+ additionalBodyProperties.put(key, value)
505
505
}
506
506
507
507
fun putAllAdditionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) =
508
508
apply {
509
509
this .additionalBodyProperties.putAll(additionalBodyProperties)
510
510
}
511
511
512
+ fun removeAdditionalBodyProperty (key : String ) = apply {
513
+ additionalBodyProperties.remove(key)
514
+ }
515
+
516
+ fun removeAllAdditionalBodyProperties (keys : Set <String >) = apply {
517
+ keys.forEach(::removeAdditionalBodyProperty)
518
+ }
519
+
512
520
fun build (): ImageGenerateParams =
513
521
ImageGenerateParams (
514
522
checkNotNull(prompt) { " `prompt` is required but was not set" },
Original file line number Diff line number Diff line change @@ -183,18 +183,26 @@ constructor(
183
183
184
184
fun additionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) = apply {
185
185
this .additionalBodyProperties.clear()
186
- this .additionalBodyProperties.putAll (additionalBodyProperties)
186
+ putAllAdditionalBodyProperties (additionalBodyProperties)
187
187
}
188
188
189
189
fun putAdditionalBodyProperty (key : String , value : JsonValue ) = apply {
190
- this . additionalBodyProperties.put(key, value)
190
+ additionalBodyProperties.put(key, value)
191
191
}
192
192
193
193
fun putAllAdditionalBodyProperties (additionalBodyProperties : Map <String , JsonValue >) =
194
194
apply {
195
195
this .additionalBodyProperties.putAll(additionalBodyProperties)
196
196
}
197
197
198
+ fun removeAdditionalBodyProperty (key : String ) = apply {
199
+ additionalBodyProperties.remove(key)
200
+ }
201
+
202
+ fun removeAllAdditionalBodyProperties (keys : Set <String >) = apply {
203
+ keys.forEach(::removeAdditionalBodyProperty)
204
+ }
205
+
198
206
fun build (): ModelDeleteParams =
199
207
ModelDeleteParams (
200
208
checkNotNull(model) { " `model` is required but was not set" },
You can’t perform that action at this time.
0 commit comments