@@ -24,6 +24,7 @@ class QueryExampleSchemaWithRuns
2424private constructor (
2525 private val sessionIds: JsonField <List <String >>,
2626 private val comparativeExperimentId: JsonField <String >,
27+ private val exampleIds: JsonField <List <String >>,
2728 private val filters: JsonField <Filters >,
2829 private val limit: JsonField <Long >,
2930 private val offset: JsonField <Long >,
@@ -41,6 +42,9 @@ private constructor(
4142 @JsonProperty(" comparative_experiment_id" )
4243 @ExcludeMissing
4344 comparativeExperimentId: JsonField <String > = JsonMissing .of(),
45+ @JsonProperty(" example_ids" )
46+ @ExcludeMissing
47+ exampleIds: JsonField <List <String >> = JsonMissing .of(),
4448 @JsonProperty(" filters" ) @ExcludeMissing filters: JsonField <Filters > = JsonMissing .of(),
4549 @JsonProperty(" limit" ) @ExcludeMissing limit: JsonField <Long > = JsonMissing .of(),
4650 @JsonProperty(" offset" ) @ExcludeMissing offset: JsonField <Long > = JsonMissing .of(),
@@ -52,6 +56,7 @@ private constructor(
5256 ) : this (
5357 sessionIds,
5458 comparativeExperimentId,
59+ exampleIds,
5560 filters,
5661 limit,
5762 offset,
@@ -74,6 +79,12 @@ private constructor(
7479 fun comparativeExperimentId (): Optional <String > =
7580 comparativeExperimentId.getOptional(" comparative_experiment_id" )
7681
82+ /* *
83+ * @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
84+ * server responded with an unexpected value).
85+ */
86+ fun exampleIds (): Optional <List <String >> = exampleIds.getOptional(" example_ids" )
87+
7788 /* *
7889 * @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
7990 * server responded with an unexpected value).
@@ -130,6 +141,15 @@ private constructor(
130141 @ExcludeMissing
131142 fun _comparativeExperimentId (): JsonField <String > = comparativeExperimentId
132143
144+ /* *
145+ * Returns the raw JSON value of [exampleIds].
146+ *
147+ * Unlike [exampleIds], this method doesn't throw if the JSON field has an unexpected type.
148+ */
149+ @JsonProperty(" example_ids" )
150+ @ExcludeMissing
151+ fun _exampleIds (): JsonField <List <String >> = exampleIds
152+
133153 /* *
134154 * Returns the raw JSON value of [filters].
135155 *
@@ -204,6 +224,7 @@ private constructor(
204224
205225 private var sessionIds: JsonField <MutableList <String >>? = null
206226 private var comparativeExperimentId: JsonField <String > = JsonMissing .of()
227+ private var exampleIds: JsonField <MutableList <String >>? = null
207228 private var filters: JsonField <Filters > = JsonMissing .of()
208229 private var limit: JsonField <Long > = JsonMissing .of()
209230 private var offset: JsonField <Long > = JsonMissing .of()
@@ -216,6 +237,7 @@ private constructor(
216237 internal fun from (queryExampleSchemaWithRuns : QueryExampleSchemaWithRuns ) = apply {
217238 sessionIds = queryExampleSchemaWithRuns.sessionIds.map { it.toMutableList() }
218239 comparativeExperimentId = queryExampleSchemaWithRuns.comparativeExperimentId
240+ exampleIds = queryExampleSchemaWithRuns.exampleIds.map { it.toMutableList() }
219241 filters = queryExampleSchemaWithRuns.filters
220242 limit = queryExampleSchemaWithRuns.limit
221243 offset = queryExampleSchemaWithRuns.offset
@@ -271,6 +293,34 @@ private constructor(
271293 this .comparativeExperimentId = comparativeExperimentId
272294 }
273295
296+ fun exampleIds (exampleIds : List <String >? ) = exampleIds(JsonField .ofNullable(exampleIds))
297+
298+ /* * Alias for calling [Builder.exampleIds] with `exampleIds.orElse(null)`. */
299+ fun exampleIds (exampleIds : Optional <List <String >>) = exampleIds(exampleIds.getOrNull())
300+
301+ /* *
302+ * Sets [Builder.exampleIds] to an arbitrary JSON value.
303+ *
304+ * You should usually call [Builder.exampleIds] with a well-typed `List<String>` value
305+ * instead. This method is primarily for setting the field to an undocumented or not yet
306+ * supported value.
307+ */
308+ fun exampleIds (exampleIds : JsonField <List <String >>) = apply {
309+ this .exampleIds = exampleIds.map { it.toMutableList() }
310+ }
311+
312+ /* *
313+ * Adds a single [String] to [exampleIds].
314+ *
315+ * @throws IllegalStateException if the field was previously set to a non-list.
316+ */
317+ fun addExampleId (exampleId : String ) = apply {
318+ exampleIds =
319+ (exampleIds ? : JsonField .of(mutableListOf ())).also {
320+ checkKnown(" exampleIds" , it).add(exampleId)
321+ }
322+ }
323+
274324 fun filters (filters : Filters ? ) = filters(JsonField .ofNullable(filters))
275325
276326 /* * Alias for calling [Builder.filters] with `filters.orElse(null)`. */
@@ -377,6 +427,7 @@ private constructor(
377427 QueryExampleSchemaWithRuns (
378428 checkRequired(" sessionIds" , sessionIds).map { it.toImmutable() },
379429 comparativeExperimentId,
430+ (exampleIds ? : JsonMissing .of()).map { it.toImmutable() },
380431 filters,
381432 limit,
382433 offset,
@@ -396,6 +447,7 @@ private constructor(
396447
397448 sessionIds()
398449 comparativeExperimentId()
450+ exampleIds()
399451 filters().ifPresent { it.validate() }
400452 limit()
401453 offset()
@@ -422,6 +474,7 @@ private constructor(
422474 internal fun validity (): Int =
423475 (sessionIds.asKnown().getOrNull()?.size ? : 0 ) +
424476 (if (comparativeExperimentId.asKnown().isPresent) 1 else 0 ) +
477+ (exampleIds.asKnown().getOrNull()?.size ? : 0 ) +
425478 (filters.asKnown().getOrNull()?.validity() ? : 0 ) +
426479 (if (limit.asKnown().isPresent) 1 else 0 ) +
427480 (if (offset.asKnown().isPresent) 1 else 0 ) +
@@ -536,6 +589,7 @@ private constructor(
536589 return other is QueryExampleSchemaWithRuns &&
537590 sessionIds == other.sessionIds &&
538591 comparativeExperimentId == other.comparativeExperimentId &&
592+ exampleIds == other.exampleIds &&
539593 filters == other.filters &&
540594 limit == other.limit &&
541595 offset == other.offset &&
@@ -549,6 +603,7 @@ private constructor(
549603 Objects .hash(
550604 sessionIds,
551605 comparativeExperimentId,
606+ exampleIds,
552607 filters,
553608 limit,
554609 offset,
@@ -562,5 +617,5 @@ private constructor(
562617 override fun hashCode (): Int = hashCode
563618
564619 override fun toString () =
565- " QueryExampleSchemaWithRuns{sessionIds=$sessionIds , comparativeExperimentId=$comparativeExperimentId , filters=$filters , limit=$limit , offset=$offset , preview=$preview , sortParams=$sortParams , stream=$stream , additionalProperties=$additionalProperties }"
620+ " QueryExampleSchemaWithRuns{sessionIds=$sessionIds , comparativeExperimentId=$comparativeExperimentId , exampleIds= $exampleIds , filters=$filters , limit=$limit , offset=$offset , preview=$preview , sortParams=$sortParams , stream=$stream , additionalProperties=$additionalProperties }"
566621}
0 commit comments