Skip to content

Commit ef7c7a7

Browse files
feat(api): api update
1 parent 643c7b1 commit ef7c7a7

7 files changed

Lines changed: 129 additions & 5 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 104
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-5897df13cd2d3a65efc44052c7e2fe641bb8172660515fd0cabd250aafce94dd.yml
3-
openapi_spec_hash: 0b8c2dc1d007b2b331d2248fe6d3b0f4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-c2b3a4d69faa0d2ef133fe88ad2d44be99213326a60deac8ba8bc3ad8ee7c25e.yml
3+
openapi_spec_hash: a50a854c56b62d7a15e9f594aabe0474
44
config_hash: 95f6a6cccc50b0e616468fc26d25b304

langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/runs/QueryExampleSchemaWithRuns.kt

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ private constructor(
2626
private val comparativeExperimentId: JsonField<String>,
2727
private val exampleIds: JsonField<List<String>>,
2828
private val filters: JsonField<Filters>,
29+
private val includeAnnotatorDetail: JsonField<Boolean>,
2930
private val limit: JsonField<Long>,
3031
private val offset: JsonField<Long>,
3132
private val preview: JsonField<Boolean>,
@@ -46,6 +47,9 @@ private constructor(
4647
@ExcludeMissing
4748
exampleIds: JsonField<List<String>> = JsonMissing.of(),
4849
@JsonProperty("filters") @ExcludeMissing filters: JsonField<Filters> = JsonMissing.of(),
50+
@JsonProperty("include_annotator_detail")
51+
@ExcludeMissing
52+
includeAnnotatorDetail: JsonField<Boolean> = JsonMissing.of(),
4953
@JsonProperty("limit") @ExcludeMissing limit: JsonField<Long> = JsonMissing.of(),
5054
@JsonProperty("offset") @ExcludeMissing offset: JsonField<Long> = JsonMissing.of(),
5155
@JsonProperty("preview") @ExcludeMissing preview: JsonField<Boolean> = JsonMissing.of(),
@@ -58,6 +62,7 @@ private constructor(
5862
comparativeExperimentId,
5963
exampleIds,
6064
filters,
65+
includeAnnotatorDetail,
6166
limit,
6267
offset,
6368
preview,
@@ -91,6 +96,13 @@ private constructor(
9196
*/
9297
fun filters(): Optional<Filters> = filters.getOptional("filters")
9398

99+
/**
100+
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
101+
* server responded with an unexpected value).
102+
*/
103+
fun includeAnnotatorDetail(): Optional<Boolean> =
104+
includeAnnotatorDetail.getOptional("include_annotator_detail")
105+
94106
/**
95107
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
96108
* server responded with an unexpected value).
@@ -157,6 +169,16 @@ private constructor(
157169
*/
158170
@JsonProperty("filters") @ExcludeMissing fun _filters(): JsonField<Filters> = filters
159171

172+
/**
173+
* Returns the raw JSON value of [includeAnnotatorDetail].
174+
*
175+
* Unlike [includeAnnotatorDetail], this method doesn't throw if the JSON field has an
176+
* unexpected type.
177+
*/
178+
@JsonProperty("include_annotator_detail")
179+
@ExcludeMissing
180+
fun _includeAnnotatorDetail(): JsonField<Boolean> = includeAnnotatorDetail
181+
160182
/**
161183
* Returns the raw JSON value of [limit].
162184
*
@@ -226,6 +248,7 @@ private constructor(
226248
private var comparativeExperimentId: JsonField<String> = JsonMissing.of()
227249
private var exampleIds: JsonField<MutableList<String>>? = null
228250
private var filters: JsonField<Filters> = JsonMissing.of()
251+
private var includeAnnotatorDetail: JsonField<Boolean> = JsonMissing.of()
229252
private var limit: JsonField<Long> = JsonMissing.of()
230253
private var offset: JsonField<Long> = JsonMissing.of()
231254
private var preview: JsonField<Boolean> = JsonMissing.of()
@@ -239,6 +262,7 @@ private constructor(
239262
comparativeExperimentId = queryExampleSchemaWithRuns.comparativeExperimentId
240263
exampleIds = queryExampleSchemaWithRuns.exampleIds.map { it.toMutableList() }
241264
filters = queryExampleSchemaWithRuns.filters
265+
includeAnnotatorDetail = queryExampleSchemaWithRuns.includeAnnotatorDetail
242266
limit = queryExampleSchemaWithRuns.limit
243267
offset = queryExampleSchemaWithRuns.offset
244268
preview = queryExampleSchemaWithRuns.preview
@@ -334,6 +358,20 @@ private constructor(
334358
*/
335359
fun filters(filters: JsonField<Filters>) = apply { this.filters = filters }
336360

361+
fun includeAnnotatorDetail(includeAnnotatorDetail: Boolean) =
362+
includeAnnotatorDetail(JsonField.of(includeAnnotatorDetail))
363+
364+
/**
365+
* Sets [Builder.includeAnnotatorDetail] to an arbitrary JSON value.
366+
*
367+
* You should usually call [Builder.includeAnnotatorDetail] with a well-typed [Boolean]
368+
* value instead. This method is primarily for setting the field to an undocumented or not
369+
* yet supported value.
370+
*/
371+
fun includeAnnotatorDetail(includeAnnotatorDetail: JsonField<Boolean>) = apply {
372+
this.includeAnnotatorDetail = includeAnnotatorDetail
373+
}
374+
337375
fun limit(limit: Long) = limit(JsonField.of(limit))
338376

339377
/**
@@ -429,6 +467,7 @@ private constructor(
429467
comparativeExperimentId,
430468
(exampleIds ?: JsonMissing.of()).map { it.toImmutable() },
431469
filters,
470+
includeAnnotatorDetail,
432471
limit,
433472
offset,
434473
preview,
@@ -449,6 +488,7 @@ private constructor(
449488
comparativeExperimentId()
450489
exampleIds()
451490
filters().ifPresent { it.validate() }
491+
includeAnnotatorDetail()
452492
limit()
453493
offset()
454494
preview()
@@ -476,6 +516,7 @@ private constructor(
476516
(if (comparativeExperimentId.asKnown().isPresent) 1 else 0) +
477517
(exampleIds.asKnown().getOrNull()?.size ?: 0) +
478518
(filters.asKnown().getOrNull()?.validity() ?: 0) +
519+
(if (includeAnnotatorDetail.asKnown().isPresent) 1 else 0) +
479520
(if (limit.asKnown().isPresent) 1 else 0) +
480521
(if (offset.asKnown().isPresent) 1 else 0) +
481522
(if (preview.asKnown().isPresent) 1 else 0) +
@@ -591,6 +632,7 @@ private constructor(
591632
comparativeExperimentId == other.comparativeExperimentId &&
592633
exampleIds == other.exampleIds &&
593634
filters == other.filters &&
635+
includeAnnotatorDetail == other.includeAnnotatorDetail &&
594636
limit == other.limit &&
595637
offset == other.offset &&
596638
preview == other.preview &&
@@ -605,6 +647,7 @@ private constructor(
605647
comparativeExperimentId,
606648
exampleIds,
607649
filters,
650+
includeAnnotatorDetail,
608651
limit,
609652
offset,
610653
preview,
@@ -617,5 +660,5 @@ private constructor(
617660
override fun hashCode(): Int = hashCode
618661

619662
override fun toString() =
620-
"QueryExampleSchemaWithRuns{sessionIds=$sessionIds, comparativeExperimentId=$comparativeExperimentId, exampleIds=$exampleIds, filters=$filters, limit=$limit, offset=$offset, preview=$preview, sortParams=$sortParams, stream=$stream, additionalProperties=$additionalProperties}"
663+
"QueryExampleSchemaWithRuns{sessionIds=$sessionIds, comparativeExperimentId=$comparativeExperimentId, exampleIds=$exampleIds, filters=$filters, includeAnnotatorDetail=$includeAnnotatorDetail, limit=$limit, offset=$offset, preview=$preview, sortParams=$sortParams, stream=$stream, additionalProperties=$additionalProperties}"
621664
}

langsmith-java-core/src/main/kotlin/com/langchain/smith/models/datasets/runs/RunCreateParams.kt

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ private constructor(
6565
*/
6666
fun filters(): Optional<Filters> = body.filters()
6767

68+
/**
69+
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
70+
* server responded with an unexpected value).
71+
*/
72+
fun includeAnnotatorDetail(): Optional<Boolean> = body.includeAnnotatorDetail()
73+
6874
/**
6975
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
7076
* server responded with an unexpected value).
@@ -124,6 +130,14 @@ private constructor(
124130
*/
125131
fun _filters(): JsonField<Filters> = body._filters()
126132

133+
/**
134+
* Returns the raw JSON value of [includeAnnotatorDetail].
135+
*
136+
* Unlike [includeAnnotatorDetail], this method doesn't throw if the JSON field has an
137+
* unexpected type.
138+
*/
139+
fun _includeAnnotatorDetail(): JsonField<Boolean> = body._includeAnnotatorDetail()
140+
127141
/**
128142
* Returns the raw JSON value of [limit].
129143
*
@@ -220,7 +234,7 @@ private constructor(
220234
* - [comparativeExperimentId]
221235
* - [exampleIds]
222236
* - [filters]
223-
* - [limit]
237+
* - [includeAnnotatorDetail]
224238
* - etc.
225239
*/
226240
fun body(body: Body) = apply { this.body = body.toBuilder() }
@@ -299,6 +313,21 @@ private constructor(
299313
*/
300314
fun filters(filters: JsonField<Filters>) = apply { body.filters(filters) }
301315

316+
fun includeAnnotatorDetail(includeAnnotatorDetail: Boolean) = apply {
317+
body.includeAnnotatorDetail(includeAnnotatorDetail)
318+
}
319+
320+
/**
321+
* Sets [Builder.includeAnnotatorDetail] to an arbitrary JSON value.
322+
*
323+
* You should usually call [Builder.includeAnnotatorDetail] with a well-typed [Boolean]
324+
* value instead. This method is primarily for setting the field to an undocumented or not
325+
* yet supported value.
326+
*/
327+
fun includeAnnotatorDetail(includeAnnotatorDetail: JsonField<Boolean>) = apply {
328+
body.includeAnnotatorDetail(includeAnnotatorDetail)
329+
}
330+
302331
fun limit(limit: Long?) = apply { body.limit(limit) }
303332

304333
/**
@@ -539,6 +568,7 @@ private constructor(
539568
private val comparativeExperimentId: JsonField<String>,
540569
private val exampleIds: JsonField<List<String>>,
541570
private val filters: JsonField<Filters>,
571+
private val includeAnnotatorDetail: JsonField<Boolean>,
542572
private val limit: JsonField<Long>,
543573
private val offset: JsonField<Long>,
544574
private val preview: JsonField<Boolean>,
@@ -559,6 +589,9 @@ private constructor(
559589
@ExcludeMissing
560590
exampleIds: JsonField<List<String>> = JsonMissing.of(),
561591
@JsonProperty("filters") @ExcludeMissing filters: JsonField<Filters> = JsonMissing.of(),
592+
@JsonProperty("include_annotator_detail")
593+
@ExcludeMissing
594+
includeAnnotatorDetail: JsonField<Boolean> = JsonMissing.of(),
562595
@JsonProperty("limit") @ExcludeMissing limit: JsonField<Long> = JsonMissing.of(),
563596
@JsonProperty("offset") @ExcludeMissing offset: JsonField<Long> = JsonMissing.of(),
564597
@JsonProperty("preview") @ExcludeMissing preview: JsonField<Boolean> = JsonMissing.of(),
@@ -571,6 +604,7 @@ private constructor(
571604
comparativeExperimentId,
572605
exampleIds,
573606
filters,
607+
includeAnnotatorDetail,
574608
limit,
575609
offset,
576610
preview,
@@ -604,6 +638,13 @@ private constructor(
604638
*/
605639
fun filters(): Optional<Filters> = filters.getOptional("filters")
606640

641+
/**
642+
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if
643+
* the server responded with an unexpected value).
644+
*/
645+
fun includeAnnotatorDetail(): Optional<Boolean> =
646+
includeAnnotatorDetail.getOptional("include_annotator_detail")
647+
607648
/**
608649
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if
609650
* the server responded with an unexpected value).
@@ -670,6 +711,16 @@ private constructor(
670711
*/
671712
@JsonProperty("filters") @ExcludeMissing fun _filters(): JsonField<Filters> = filters
672713

714+
/**
715+
* Returns the raw JSON value of [includeAnnotatorDetail].
716+
*
717+
* Unlike [includeAnnotatorDetail], this method doesn't throw if the JSON field has an
718+
* unexpected type.
719+
*/
720+
@JsonProperty("include_annotator_detail")
721+
@ExcludeMissing
722+
fun _includeAnnotatorDetail(): JsonField<Boolean> = includeAnnotatorDetail
723+
673724
/**
674725
* Returns the raw JSON value of [limit].
675726
*
@@ -739,6 +790,7 @@ private constructor(
739790
private var comparativeExperimentId: JsonField<String> = JsonMissing.of()
740791
private var exampleIds: JsonField<MutableList<String>>? = null
741792
private var filters: JsonField<Filters> = JsonMissing.of()
793+
private var includeAnnotatorDetail: JsonField<Boolean> = JsonMissing.of()
742794
private var limit: JsonField<Long> = JsonMissing.of()
743795
private var offset: JsonField<Long> = JsonMissing.of()
744796
private var preview: JsonField<Boolean> = JsonMissing.of()
@@ -752,6 +804,7 @@ private constructor(
752804
comparativeExperimentId = body.comparativeExperimentId
753805
exampleIds = body.exampleIds.map { it.toMutableList() }
754806
filters = body.filters
807+
includeAnnotatorDetail = body.includeAnnotatorDetail
755808
limit = body.limit
756809
offset = body.offset
757810
preview = body.preview
@@ -848,6 +901,20 @@ private constructor(
848901
*/
849902
fun filters(filters: JsonField<Filters>) = apply { this.filters = filters }
850903

904+
fun includeAnnotatorDetail(includeAnnotatorDetail: Boolean) =
905+
includeAnnotatorDetail(JsonField.of(includeAnnotatorDetail))
906+
907+
/**
908+
* Sets [Builder.includeAnnotatorDetail] to an arbitrary JSON value.
909+
*
910+
* You should usually call [Builder.includeAnnotatorDetail] with a well-typed [Boolean]
911+
* value instead. This method is primarily for setting the field to an undocumented or
912+
* not yet supported value.
913+
*/
914+
fun includeAnnotatorDetail(includeAnnotatorDetail: JsonField<Boolean>) = apply {
915+
this.includeAnnotatorDetail = includeAnnotatorDetail
916+
}
917+
851918
fun limit(limit: Long?) = limit(JsonField.ofNullable(limit))
852919

853920
/**
@@ -957,6 +1024,7 @@ private constructor(
9571024
comparativeExperimentId,
9581025
(exampleIds ?: JsonMissing.of()).map { it.toImmutable() },
9591026
filters,
1027+
includeAnnotatorDetail,
9601028
limit,
9611029
offset,
9621030
preview,
@@ -977,6 +1045,7 @@ private constructor(
9771045
comparativeExperimentId()
9781046
exampleIds()
9791047
filters().ifPresent { it.validate() }
1048+
includeAnnotatorDetail()
9801049
limit()
9811050
offset()
9821051
preview()
@@ -1005,6 +1074,7 @@ private constructor(
10051074
(if (comparativeExperimentId.asKnown().isPresent) 1 else 0) +
10061075
(exampleIds.asKnown().getOrNull()?.size ?: 0) +
10071076
(filters.asKnown().getOrNull()?.validity() ?: 0) +
1077+
(if (includeAnnotatorDetail.asKnown().isPresent) 1 else 0) +
10081078
(if (limit.asKnown().isPresent) 1 else 0) +
10091079
(if (offset.asKnown().isPresent) 1 else 0) +
10101080
(if (preview.asKnown().isPresent) 1 else 0) +
@@ -1021,6 +1091,7 @@ private constructor(
10211091
comparativeExperimentId == other.comparativeExperimentId &&
10221092
exampleIds == other.exampleIds &&
10231093
filters == other.filters &&
1094+
includeAnnotatorDetail == other.includeAnnotatorDetail &&
10241095
limit == other.limit &&
10251096
offset == other.offset &&
10261097
preview == other.preview &&
@@ -1035,6 +1106,7 @@ private constructor(
10351106
comparativeExperimentId,
10361107
exampleIds,
10371108
filters,
1109+
includeAnnotatorDetail,
10381110
limit,
10391111
offset,
10401112
preview,
@@ -1047,7 +1119,7 @@ private constructor(
10471119
override fun hashCode(): Int = hashCode
10481120

10491121
override fun toString() =
1050-
"Body{sessionIds=$sessionIds, comparativeExperimentId=$comparativeExperimentId, exampleIds=$exampleIds, filters=$filters, limit=$limit, offset=$offset, preview=$preview, sortParams=$sortParams, stream=$stream, additionalProperties=$additionalProperties}"
1122+
"Body{sessionIds=$sessionIds, comparativeExperimentId=$comparativeExperimentId, exampleIds=$exampleIds, filters=$filters, includeAnnotatorDetail=$includeAnnotatorDetail, limit=$limit, offset=$offset, preview=$preview, sortParams=$sortParams, stream=$stream, additionalProperties=$additionalProperties}"
10511123
}
10521124

10531125
class Filters

langsmith-java-core/src/test/kotlin/com/langchain/smith/models/datasets/runs/QueryExampleSchemaWithRunsTest.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ internal class QueryExampleSchemaWithRunsTest {
2323
.putAdditionalProperty("foo", JsonValue.from(listOf("string")))
2424
.build()
2525
)
26+
.includeAnnotatorDetail(true)
2627
.limit(1L)
2728
.offset(0L)
2829
.preview(true)
@@ -47,6 +48,7 @@ internal class QueryExampleSchemaWithRunsTest {
4748
.putAdditionalProperty("foo", JsonValue.from(listOf("string")))
4849
.build()
4950
)
51+
assertThat(queryExampleSchemaWithRuns.includeAnnotatorDetail()).contains(true)
5052
assertThat(queryExampleSchemaWithRuns.limit()).contains(1L)
5153
assertThat(queryExampleSchemaWithRuns.offset()).contains(0L)
5254
assertThat(queryExampleSchemaWithRuns.preview()).contains(true)
@@ -73,6 +75,7 @@ internal class QueryExampleSchemaWithRunsTest {
7375
.putAdditionalProperty("foo", JsonValue.from(listOf("string")))
7476
.build()
7577
)
78+
.includeAnnotatorDetail(true)
7679
.limit(1L)
7780
.offset(0L)
7881
.preview(true)

0 commit comments

Comments
 (0)