@@ -24,6 +24,8 @@ private constructor(
2424 private val commitHash: JsonField <String >,
2525 private val examples: JsonField <List <Example >>,
2626 private val manifest: JsonValue ,
27+ private val modelConfig: JsonValue ,
28+ private val modelProvider: JsonField <String >,
2729 private val additionalProperties: MutableMap <String , JsonValue >,
2830) {
2931
@@ -36,7 +38,11 @@ private constructor(
3638 @ExcludeMissing
3739 examples: JsonField <List <Example >> = JsonMissing .of(),
3840 @JsonProperty(" manifest" ) @ExcludeMissing manifest: JsonValue = JsonMissing .of(),
39- ) : this (commitHash, examples, manifest, mutableMapOf ())
41+ @JsonProperty(" model_config" ) @ExcludeMissing modelConfig: JsonValue = JsonMissing .of(),
42+ @JsonProperty(" model_provider" )
43+ @ExcludeMissing
44+ modelProvider: JsonField <String > = JsonMissing .of(),
45+ ) : this (commitHash, examples, manifest, modelConfig, modelProvider, mutableMapOf ())
4046
4147 /* *
4248 * @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
@@ -58,6 +64,20 @@ private constructor(
5864 */
5965 @JsonProperty(" manifest" ) @ExcludeMissing fun _manifest (): JsonValue = manifest
6066
67+ /* *
68+ * This arbitrary value can be deserialized into a custom type using the `convert` method:
69+ * ```java
70+ * MyClass myObject = commitRetrieveResponse.modelConfig().convert(MyClass.class);
71+ * ```
72+ */
73+ @JsonProperty(" model_config" ) @ExcludeMissing fun _modelConfig (): JsonValue = modelConfig
74+
75+ /* *
76+ * @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
77+ * server responded with an unexpected value).
78+ */
79+ fun modelProvider (): Optional <String > = modelProvider.getOptional(" model_provider" )
80+
6181 /* *
6282 * Returns the raw JSON value of [commitHash].
6383 *
@@ -72,6 +92,15 @@ private constructor(
7292 */
7393 @JsonProperty(" examples" ) @ExcludeMissing fun _examples (): JsonField <List <Example >> = examples
7494
95+ /* *
96+ * Returns the raw JSON value of [modelProvider].
97+ *
98+ * Unlike [modelProvider], this method doesn't throw if the JSON field has an unexpected type.
99+ */
100+ @JsonProperty(" model_provider" )
101+ @ExcludeMissing
102+ fun _modelProvider (): JsonField <String > = modelProvider
103+
75104 @JsonAnySetter
76105 private fun putAdditionalProperty (key : String , value : JsonValue ) {
77106 additionalProperties.put(key, value)
@@ -96,13 +125,17 @@ private constructor(
96125 private var commitHash: JsonField <String > = JsonMissing .of()
97126 private var examples: JsonField <MutableList <Example >>? = null
98127 private var manifest: JsonValue = JsonMissing .of()
128+ private var modelConfig: JsonValue = JsonMissing .of()
129+ private var modelProvider: JsonField <String > = JsonMissing .of()
99130 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
100131
101132 @JvmSynthetic
102133 internal fun from (commitRetrieveResponse : CommitRetrieveResponse ) = apply {
103134 commitHash = commitRetrieveResponse.commitHash
104135 examples = commitRetrieveResponse.examples.map { it.toMutableList() }
105136 manifest = commitRetrieveResponse.manifest
137+ modelConfig = commitRetrieveResponse.modelConfig
138+ modelProvider = commitRetrieveResponse.modelProvider
106139 additionalProperties = commitRetrieveResponse.additionalProperties.toMutableMap()
107140 }
108141
@@ -144,6 +177,21 @@ private constructor(
144177
145178 fun manifest (manifest : JsonValue ) = apply { this .manifest = manifest }
146179
180+ fun modelConfig (modelConfig : JsonValue ) = apply { this .modelConfig = modelConfig }
181+
182+ fun modelProvider (modelProvider : String ) = modelProvider(JsonField .of(modelProvider))
183+
184+ /* *
185+ * Sets [Builder.modelProvider] to an arbitrary JSON value.
186+ *
187+ * You should usually call [Builder.modelProvider] with a well-typed [String] value instead.
188+ * This method is primarily for setting the field to an undocumented or not yet supported
189+ * value.
190+ */
191+ fun modelProvider (modelProvider : JsonField <String >) = apply {
192+ this .modelProvider = modelProvider
193+ }
194+
147195 fun additionalProperties (additionalProperties : Map <String , JsonValue >) = apply {
148196 this .additionalProperties.clear()
149197 putAllAdditionalProperties(additionalProperties)
@@ -173,6 +221,8 @@ private constructor(
173221 commitHash,
174222 (examples ? : JsonMissing .of()).map { it.toImmutable() },
175223 manifest,
224+ modelConfig,
225+ modelProvider,
176226 additionalProperties.toMutableMap(),
177227 )
178228 }
@@ -186,6 +236,7 @@ private constructor(
186236
187237 commitHash()
188238 examples().ifPresent { it.forEach { it.validate() } }
239+ modelProvider()
189240 validated = true
190241 }
191242
@@ -205,7 +256,8 @@ private constructor(
205256 @JvmSynthetic
206257 internal fun validity (): Int =
207258 (if (commitHash.asKnown().isPresent) 1 else 0 ) +
208- (examples.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ? : 0 )
259+ (examples.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ? : 0 ) +
260+ (if (modelProvider.asKnown().isPresent) 1 else 0 )
209261
210262 class Example
211263 @JsonCreator(mode = JsonCreator .Mode .DISABLED )
@@ -462,15 +514,24 @@ private constructor(
462514 commitHash == other.commitHash &&
463515 examples == other.examples &&
464516 manifest == other.manifest &&
517+ modelConfig == other.modelConfig &&
518+ modelProvider == other.modelProvider &&
465519 additionalProperties == other.additionalProperties
466520 }
467521
468522 private val hashCode: Int by lazy {
469- Objects .hash(commitHash, examples, manifest, additionalProperties)
523+ Objects .hash(
524+ commitHash,
525+ examples,
526+ manifest,
527+ modelConfig,
528+ modelProvider,
529+ additionalProperties,
530+ )
470531 }
471532
472533 override fun hashCode (): Int = hashCode
473534
474535 override fun toString () =
475- " CommitRetrieveResponse{commitHash=$commitHash , examples=$examples , manifest=$manifest , additionalProperties=$additionalProperties }"
536+ " CommitRetrieveResponse{commitHash=$commitHash , examples=$examples , manifest=$manifest , modelConfig= $modelConfig , modelProvider= $modelProvider , additionalProperties=$additionalProperties }"
476537}
0 commit comments