@@ -65,7 +65,6 @@ private constructor(
65
65
private val truncation: JsonField <Truncation >,
66
66
private val usage: JsonField <ResponseUsage >,
67
67
private val user: JsonField <String >,
68
- private val verbosity: JsonField <Verbosity >,
69
68
private val additionalProperties: MutableMap <String , JsonValue >,
70
69
) {
71
70
@@ -138,9 +137,6 @@ private constructor(
138
137
truncation: JsonField <Truncation > = JsonMissing .of(),
139
138
@JsonProperty(" usage" ) @ExcludeMissing usage: JsonField <ResponseUsage > = JsonMissing .of(),
140
139
@JsonProperty(" user" ) @ExcludeMissing user: JsonField <String > = JsonMissing .of(),
141
- @JsonProperty(" verbosity" )
142
- @ExcludeMissing
143
- verbosity: JsonField <Verbosity > = JsonMissing .of(),
144
140
) : this (
145
141
id,
146
142
createdAt,
@@ -171,7 +167,6 @@ private constructor(
171
167
truncation,
172
168
usage,
173
169
user,
174
- verbosity,
175
170
mutableMapOf (),
176
171
)
177
172
@@ -492,16 +487,6 @@ private constructor(
492
487
*/
493
488
@Deprecated(" deprecated" ) fun user (): Optional <String > = user.getOptional(" user" )
494
489
495
- /* *
496
- * Constrains the verbosity of the model's response. Lower values will result in more concise
497
- * responses, while higher values will result in more verbose responses. Currently supported
498
- * values are `low`, `medium`, and `high`.
499
- *
500
- * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
501
- * server responded with an unexpected value).
502
- */
503
- fun verbosity (): Optional <Verbosity > = verbosity.getOptional(" verbosity" )
504
-
505
490
/* *
506
491
* Returns the raw JSON value of [id].
507
492
*
@@ -729,13 +714,6 @@ private constructor(
729
714
@ExcludeMissing
730
715
fun _user (): JsonField <String > = user
731
716
732
- /* *
733
- * Returns the raw JSON value of [verbosity].
734
- *
735
- * Unlike [verbosity], this method doesn't throw if the JSON field has an unexpected type.
736
- */
737
- @JsonProperty(" verbosity" ) @ExcludeMissing fun _verbosity (): JsonField <Verbosity > = verbosity
738
-
739
717
@JsonAnySetter
740
718
private fun putAdditionalProperty (key : String , value : JsonValue ) {
741
719
additionalProperties.put(key, value)
@@ -805,7 +783,6 @@ private constructor(
805
783
private var truncation: JsonField <Truncation > = JsonMissing .of()
806
784
private var usage: JsonField <ResponseUsage > = JsonMissing .of()
807
785
private var user: JsonField <String > = JsonMissing .of()
808
- private var verbosity: JsonField <Verbosity > = JsonMissing .of()
809
786
private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
810
787
811
788
@JvmSynthetic
@@ -839,7 +816,6 @@ private constructor(
839
816
truncation = response.truncation
840
817
usage = response.usage
841
818
user = response.user
842
- verbosity = response.verbosity
843
819
additionalProperties = response.additionalProperties.toMutableMap()
844
820
}
845
821
@@ -1641,25 +1617,6 @@ private constructor(
1641
1617
*/
1642
1618
@Deprecated(" deprecated" ) fun user (user : JsonField <String >) = apply { this .user = user }
1643
1619
1644
- /* *
1645
- * Constrains the verbosity of the model's response. Lower values will result in more
1646
- * concise responses, while higher values will result in more verbose responses. Currently
1647
- * supported values are `low`, `medium`, and `high`.
1648
- */
1649
- fun verbosity (verbosity : Verbosity ? ) = verbosity(JsonField .ofNullable(verbosity))
1650
-
1651
- /* * Alias for calling [Builder.verbosity] with `verbosity.orElse(null)`. */
1652
- fun verbosity (verbosity : Optional <Verbosity >) = verbosity(verbosity.getOrNull())
1653
-
1654
- /* *
1655
- * Sets [Builder.verbosity] to an arbitrary JSON value.
1656
- *
1657
- * You should usually call [Builder.verbosity] with a well-typed [Verbosity] value instead.
1658
- * This method is primarily for setting the field to an undocumented or not yet supported
1659
- * value.
1660
- */
1661
- fun verbosity (verbosity : JsonField <Verbosity >) = apply { this .verbosity = verbosity }
1662
-
1663
1620
fun additionalProperties (additionalProperties : Map <String , JsonValue >) = apply {
1664
1621
this .additionalProperties.clear()
1665
1622
putAllAdditionalProperties(additionalProperties)
@@ -1734,7 +1691,6 @@ private constructor(
1734
1691
truncation,
1735
1692
usage,
1736
1693
user,
1737
- verbosity,
1738
1694
additionalProperties.toMutableMap(),
1739
1695
)
1740
1696
}
@@ -1779,7 +1735,6 @@ private constructor(
1779
1735
truncation().ifPresent { it.validate() }
1780
1736
usage().ifPresent { it.validate() }
1781
1737
user()
1782
- verbosity().ifPresent { it.validate() }
1783
1738
validated = true
1784
1739
}
1785
1740
@@ -1826,8 +1781,7 @@ private constructor(
1826
1781
(if (topLogprobs.asKnown().isPresent) 1 else 0 ) +
1827
1782
(truncation.asKnown().getOrNull()?.validity() ? : 0 ) +
1828
1783
(usage.asKnown().getOrNull()?.validity() ? : 0 ) +
1829
- (if (user.asKnown().isPresent) 1 else 0 ) +
1830
- (verbosity.asKnown().getOrNull()?.validity() ? : 0 )
1784
+ (if (user.asKnown().isPresent) 1 else 0 )
1831
1785
1832
1786
/* * Details about why the response is incomplete. */
1833
1787
class IncompleteDetails
@@ -3046,158 +3000,20 @@ private constructor(
3046
3000
override fun toString () = value.toString()
3047
3001
}
3048
3002
3049
- /* *
3050
- * Constrains the verbosity of the model's response. Lower values will result in more concise
3051
- * responses, while higher values will result in more verbose responses. Currently supported
3052
- * values are `low`, `medium`, and `high`.
3053
- */
3054
- class Verbosity @JsonCreator private constructor(private val value : JsonField <String >) : Enum {
3055
-
3056
- /* *
3057
- * Returns this class instance's raw value.
3058
- *
3059
- * This is usually only useful if this instance was deserialized from data that doesn't
3060
- * match any known member, and you want to know that value. For example, if the SDK is on an
3061
- * older version than the API, then the API may respond with new members that the SDK is
3062
- * unaware of.
3063
- */
3064
- @com.fasterxml.jackson.annotation.JsonValue fun _value (): JsonField <String > = value
3065
-
3066
- companion object {
3067
-
3068
- @JvmField val LOW = of(" low" )
3069
-
3070
- @JvmField val MEDIUM = of(" medium" )
3071
-
3072
- @JvmField val HIGH = of(" high" )
3073
-
3074
- @JvmStatic fun of (value : String ) = Verbosity (JsonField .of(value))
3075
- }
3076
-
3077
- /* * An enum containing [Verbosity]'s known values. */
3078
- enum class Known {
3079
- LOW ,
3080
- MEDIUM ,
3081
- HIGH ,
3082
- }
3083
-
3084
- /* *
3085
- * An enum containing [Verbosity]'s known values, as well as an [_UNKNOWN] member.
3086
- *
3087
- * An instance of [Verbosity] can contain an unknown value in a couple of cases:
3088
- * - It was deserialized from data that doesn't match any known member. For example, if the
3089
- * SDK is on an older version than the API, then the API may respond with new members that
3090
- * the SDK is unaware of.
3091
- * - It was constructed with an arbitrary value using the [of] method.
3092
- */
3093
- enum class Value {
3094
- LOW ,
3095
- MEDIUM ,
3096
- HIGH ,
3097
- /* *
3098
- * An enum member indicating that [Verbosity] was instantiated with an unknown value.
3099
- */
3100
- _UNKNOWN ,
3101
- }
3102
-
3103
- /* *
3104
- * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
3105
- * if the class was instantiated with an unknown value.
3106
- *
3107
- * Use the [known] method instead if you're certain the value is always known or if you want
3108
- * to throw for the unknown case.
3109
- */
3110
- fun value (): Value =
3111
- when (this ) {
3112
- LOW -> Value .LOW
3113
- MEDIUM -> Value .MEDIUM
3114
- HIGH -> Value .HIGH
3115
- else -> Value ._UNKNOWN
3116
- }
3117
-
3118
- /* *
3119
- * Returns an enum member corresponding to this class instance's value.
3120
- *
3121
- * Use the [value] method instead if you're uncertain the value is always known and don't
3122
- * want to throw for the unknown case.
3123
- *
3124
- * @throws OpenAIInvalidDataException if this class instance's value is a not a known
3125
- * member.
3126
- */
3127
- fun known (): Known =
3128
- when (this ) {
3129
- LOW -> Known .LOW
3130
- MEDIUM -> Known .MEDIUM
3131
- HIGH -> Known .HIGH
3132
- else -> throw OpenAIInvalidDataException (" Unknown Verbosity: $value " )
3133
- }
3134
-
3135
- /* *
3136
- * Returns this class instance's primitive wire representation.
3137
- *
3138
- * This differs from the [toString] method because that method is primarily for debugging
3139
- * and generally doesn't throw.
3140
- *
3141
- * @throws OpenAIInvalidDataException if this class instance's value does not have the
3142
- * expected primitive type.
3143
- */
3144
- fun asString (): String =
3145
- _value ().asString().orElseThrow { OpenAIInvalidDataException (" Value is not a String" ) }
3146
-
3147
- private var validated: Boolean = false
3148
-
3149
- fun validate (): Verbosity = apply {
3150
- if (validated) {
3151
- return @apply
3152
- }
3153
-
3154
- known()
3155
- validated = true
3156
- }
3157
-
3158
- fun isValid (): Boolean =
3159
- try {
3160
- validate()
3161
- true
3162
- } catch (e: OpenAIInvalidDataException ) {
3163
- false
3164
- }
3165
-
3166
- /* *
3167
- * Returns a score indicating how many valid values are contained in this object
3168
- * recursively.
3169
- *
3170
- * Used for best match union deserialization.
3171
- */
3172
- @JvmSynthetic internal fun validity (): Int = if (value() == Value ._UNKNOWN ) 0 else 1
3173
-
3174
- override fun equals (other : Any? ): Boolean {
3175
- if (this == = other) {
3176
- return true
3177
- }
3178
-
3179
- return /* spotless:off */ other is Verbosity && value == other.value /* spotless:on */
3180
- }
3181
-
3182
- override fun hashCode () = value.hashCode()
3183
-
3184
- override fun toString () = value.toString()
3185
- }
3186
-
3187
3003
override fun equals (other : Any? ): Boolean {
3188
3004
if (this == = other) {
3189
3005
return true
3190
3006
}
3191
3007
3192
- return /* spotless:off */ other is Response && id == other.id && createdAt == other.createdAt && error == other.error && incompleteDetails == other.incompleteDetails && instructions == other.instructions && metadata == other.metadata && model == other.model && object_ == other.object_ && output == other.output && parallelToolCalls == other.parallelToolCalls && temperature == other.temperature && toolChoice == other.toolChoice && tools == other.tools && topP == other.topP && background == other.background && maxOutputTokens == other.maxOutputTokens && maxToolCalls == other.maxToolCalls && previousResponseId == other.previousResponseId && prompt == other.prompt && promptCacheKey == other.promptCacheKey && reasoning == other.reasoning && safetyIdentifier == other.safetyIdentifier && serviceTier == other.serviceTier && status == other.status && text == other.text && topLogprobs == other.topLogprobs && truncation == other.truncation && usage == other.usage && user == other.user && verbosity == other.verbosity && additionalProperties == other.additionalProperties /* spotless:on */
3008
+ return /* spotless:off */ other is Response && id == other.id && createdAt == other.createdAt && error == other.error && incompleteDetails == other.incompleteDetails && instructions == other.instructions && metadata == other.metadata && model == other.model && object_ == other.object_ && output == other.output && parallelToolCalls == other.parallelToolCalls && temperature == other.temperature && toolChoice == other.toolChoice && tools == other.tools && topP == other.topP && background == other.background && maxOutputTokens == other.maxOutputTokens && maxToolCalls == other.maxToolCalls && previousResponseId == other.previousResponseId && prompt == other.prompt && promptCacheKey == other.promptCacheKey && reasoning == other.reasoning && safetyIdentifier == other.safetyIdentifier && serviceTier == other.serviceTier && status == other.status && text == other.text && topLogprobs == other.topLogprobs && truncation == other.truncation && usage == other.usage && user == other.user && additionalProperties == other.additionalProperties /* spotless:on */
3193
3009
}
3194
3010
3195
3011
/* spotless:off */
3196
- private val hashCode: Int by lazy { Objects .hash(id, createdAt, error, incompleteDetails, instructions, metadata, model, object_, output, parallelToolCalls, temperature, toolChoice, tools, topP, background, maxOutputTokens, maxToolCalls, previousResponseId, prompt, promptCacheKey, reasoning, safetyIdentifier, serviceTier, status, text, topLogprobs, truncation, usage, user, verbosity, additionalProperties) }
3012
+ private val hashCode: Int by lazy { Objects .hash(id, createdAt, error, incompleteDetails, instructions, metadata, model, object_, output, parallelToolCalls, temperature, toolChoice, tools, topP, background, maxOutputTokens, maxToolCalls, previousResponseId, prompt, promptCacheKey, reasoning, safetyIdentifier, serviceTier, status, text, topLogprobs, truncation, usage, user, additionalProperties) }
3197
3013
/* spotless:on */
3198
3014
3199
3015
override fun hashCode (): Int = hashCode
3200
3016
3201
3017
override fun toString () =
3202
- " Response{id=$id , createdAt=$createdAt , error=$error , incompleteDetails=$incompleteDetails , instructions=$instructions , metadata=$metadata , model=$model , object_=$object_ , output=$output , parallelToolCalls=$parallelToolCalls , temperature=$temperature , toolChoice=$toolChoice , tools=$tools , topP=$topP , background=$background , maxOutputTokens=$maxOutputTokens , maxToolCalls=$maxToolCalls , previousResponseId=$previousResponseId , prompt=$prompt , promptCacheKey=$promptCacheKey , reasoning=$reasoning , safetyIdentifier=$safetyIdentifier , serviceTier=$serviceTier , status=$status , text=$text , topLogprobs=$topLogprobs , truncation=$truncation , usage=$usage , user=$user , verbosity= $verbosity , additionalProperties=$additionalProperties }"
3018
+ " Response{id=$id , createdAt=$createdAt , error=$error , incompleteDetails=$incompleteDetails , instructions=$instructions , metadata=$metadata , model=$model , object_=$object_ , output=$output , parallelToolCalls=$parallelToolCalls , temperature=$temperature , toolChoice=$toolChoice , tools=$tools , topP=$topP , background=$background , maxOutputTokens=$maxOutputTokens , maxToolCalls=$maxToolCalls , previousResponseId=$previousResponseId , prompt=$prompt , promptCacheKey=$promptCacheKey , reasoning=$reasoning , safetyIdentifier=$safetyIdentifier , serviceTier=$serviceTier , status=$status , text=$text , topLogprobs=$topLogprobs , truncation=$truncation , usage=$usage , user=$user , additionalProperties=$additionalProperties }"
3203
3019
}
0 commit comments