Skip to content

Commit 35484cf

Browse files
feat(api): api update
1 parent 9ccfc6a commit 35484cf

7 files changed

Lines changed: 7 additions & 107 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: 103
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-e0b16776094774319c261f2beb677d5d1ce7ec9550df814146ec29d72ce2c290.yml
3-
openapi_spec_hash: e023928a065bc07daa64d8ae211b36aa
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-9a53167c450f468d0249e1b7fd8ad7f2a894d753e2e1051aa42a85af99fd906e.yml
3+
openapi_spec_hash: 3864b3f2c2f203ffa1aebaeac00e2c04
44
config_hash: c217b34d458f1b65f260715693d447f9

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

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ private constructor(
3131
private val offset: JsonField<Long>,
3232
private val preview: JsonField<Boolean>,
3333
private val sortParams: JsonField<SortParamsForRunsComparisonView>,
34-
private val stream: JsonField<Boolean>,
3534
private val additionalProperties: MutableMap<String, JsonValue>,
3635
) {
3736

@@ -56,7 +55,6 @@ private constructor(
5655
@JsonProperty("sort_params")
5756
@ExcludeMissing
5857
sortParams: JsonField<SortParamsForRunsComparisonView> = JsonMissing.of(),
59-
@JsonProperty("stream") @ExcludeMissing stream: JsonField<Boolean> = JsonMissing.of(),
6058
) : this(
6159
sessionIds,
6260
comparativeExperimentId,
@@ -67,7 +65,6 @@ private constructor(
6765
offset,
6866
preview,
6967
sortParams,
70-
stream,
7168
mutableMapOf(),
7269
)
7370

@@ -128,12 +125,6 @@ private constructor(
128125
fun sortParams(): Optional<SortParamsForRunsComparisonView> =
129126
sortParams.getOptional("sort_params")
130127

131-
/**
132-
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
133-
* server responded with an unexpected value).
134-
*/
135-
fun stream(): Optional<Boolean> = stream.getOptional("stream")
136-
137128
/**
138129
* Returns the raw JSON value of [sessionIds].
139130
*
@@ -209,13 +200,6 @@ private constructor(
209200
@ExcludeMissing
210201
fun _sortParams(): JsonField<SortParamsForRunsComparisonView> = sortParams
211202

212-
/**
213-
* Returns the raw JSON value of [stream].
214-
*
215-
* Unlike [stream], this method doesn't throw if the JSON field has an unexpected type.
216-
*/
217-
@JsonProperty("stream") @ExcludeMissing fun _stream(): JsonField<Boolean> = stream
218-
219203
@JsonAnySetter
220204
private fun putAdditionalProperty(key: String, value: JsonValue) {
221205
additionalProperties.put(key, value)
@@ -253,7 +237,6 @@ private constructor(
253237
private var offset: JsonField<Long> = JsonMissing.of()
254238
private var preview: JsonField<Boolean> = JsonMissing.of()
255239
private var sortParams: JsonField<SortParamsForRunsComparisonView> = JsonMissing.of()
256-
private var stream: JsonField<Boolean> = JsonMissing.of()
257240
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
258241

259242
@JvmSynthetic
@@ -267,7 +250,6 @@ private constructor(
267250
offset = queryExampleSchemaWithRuns.offset
268251
preview = queryExampleSchemaWithRuns.preview
269252
sortParams = queryExampleSchemaWithRuns.sortParams
270-
stream = queryExampleSchemaWithRuns.stream
271253
additionalProperties = queryExampleSchemaWithRuns.additionalProperties.toMutableMap()
272254
}
273255

@@ -420,16 +402,6 @@ private constructor(
420402
this.sortParams = sortParams
421403
}
422404

423-
fun stream(stream: Boolean) = stream(JsonField.of(stream))
424-
425-
/**
426-
* Sets [Builder.stream] to an arbitrary JSON value.
427-
*
428-
* You should usually call [Builder.stream] with a well-typed [Boolean] value instead. This
429-
* method is primarily for setting the field to an undocumented or not yet supported value.
430-
*/
431-
fun stream(stream: JsonField<Boolean>) = apply { this.stream = stream }
432-
433405
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
434406
this.additionalProperties.clear()
435407
putAllAdditionalProperties(additionalProperties)
@@ -472,7 +444,6 @@ private constructor(
472444
offset,
473445
preview,
474446
sortParams,
475-
stream,
476447
additionalProperties.toMutableMap(),
477448
)
478449
}
@@ -493,7 +464,6 @@ private constructor(
493464
offset()
494465
preview()
495466
sortParams().ifPresent { it.validate() }
496-
stream()
497467
validated = true
498468
}
499469

@@ -520,8 +490,7 @@ private constructor(
520490
(if (limit.asKnown().isPresent) 1 else 0) +
521491
(if (offset.asKnown().isPresent) 1 else 0) +
522492
(if (preview.asKnown().isPresent) 1 else 0) +
523-
(sortParams.asKnown().getOrNull()?.validity() ?: 0) +
524-
(if (stream.asKnown().isPresent) 1 else 0)
493+
(sortParams.asKnown().getOrNull()?.validity() ?: 0)
525494

526495
class Filters
527496
@JsonCreator
@@ -637,7 +606,6 @@ private constructor(
637606
offset == other.offset &&
638607
preview == other.preview &&
639608
sortParams == other.sortParams &&
640-
stream == other.stream &&
641609
additionalProperties == other.additionalProperties
642610
}
643611

@@ -652,13 +620,12 @@ private constructor(
652620
offset,
653621
preview,
654622
sortParams,
655-
stream,
656623
additionalProperties,
657624
)
658625
}
659626

660627
override fun hashCode(): Int = hashCode
661628

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

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

Lines changed: 3 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,6 @@ private constructor(
9595
*/
9696
fun sortParams(): Optional<SortParamsForRunsComparisonView> = body.sortParams()
9797

98-
/**
99-
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
100-
* server responded with an unexpected value).
101-
*/
102-
fun stream(): Optional<Boolean> = body.stream()
103-
10498
/**
10599
* Returns the raw JSON value of [sessionIds].
106100
*
@@ -166,13 +160,6 @@ private constructor(
166160
*/
167161
fun _sortParams(): JsonField<SortParamsForRunsComparisonView> = body._sortParams()
168162

169-
/**
170-
* Returns the raw JSON value of [stream].
171-
*
172-
* Unlike [stream], this method doesn't throw if the JSON field has an unexpected type.
173-
*/
174-
fun _stream(): JsonField<Boolean> = body._stream()
175-
176163
fun _additionalBodyProperties(): Map<String, JsonValue> = body._additionalProperties()
177164

178165
/** Additional headers to send with the request. */
@@ -387,16 +374,6 @@ private constructor(
387374
body.sortParams(sortParams)
388375
}
389376

390-
fun stream(stream: Boolean) = apply { body.stream(stream) }
391-
392-
/**
393-
* Sets [Builder.stream] to an arbitrary JSON value.
394-
*
395-
* You should usually call [Builder.stream] with a well-typed [Boolean] value instead. This
396-
* method is primarily for setting the field to an undocumented or not yet supported value.
397-
*/
398-
fun stream(stream: JsonField<Boolean>) = apply { body.stream(stream) }
399-
400377
fun additionalBodyProperties(additionalBodyProperties: Map<String, JsonValue>) = apply {
401378
body.additionalProperties(additionalBodyProperties)
402379
}
@@ -558,8 +535,7 @@ private constructor(
558535
* Request DTO for querying examples with runs - used for API input.
559536
*
560537
* This is separate from the internal schema to cleanly handle optional limit values. When limit
561-
* is None, the internal schema will apply appropriate defaults based on format and stream
562-
* settings.
538+
* is None, the internal schema will apply appropriate defaults based on format.
563539
*/
564540
class Body
565541
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
@@ -573,7 +549,6 @@ private constructor(
573549
private val offset: JsonField<Long>,
574550
private val preview: JsonField<Boolean>,
575551
private val sortParams: JsonField<SortParamsForRunsComparisonView>,
576-
private val stream: JsonField<Boolean>,
577552
private val additionalProperties: MutableMap<String, JsonValue>,
578553
) {
579554

@@ -598,7 +573,6 @@ private constructor(
598573
@JsonProperty("sort_params")
599574
@ExcludeMissing
600575
sortParams: JsonField<SortParamsForRunsComparisonView> = JsonMissing.of(),
601-
@JsonProperty("stream") @ExcludeMissing stream: JsonField<Boolean> = JsonMissing.of(),
602576
) : this(
603577
sessionIds,
604578
comparativeExperimentId,
@@ -609,7 +583,6 @@ private constructor(
609583
offset,
610584
preview,
611585
sortParams,
612-
stream,
613586
mutableMapOf(),
614587
)
615588

@@ -670,12 +643,6 @@ private constructor(
670643
fun sortParams(): Optional<SortParamsForRunsComparisonView> =
671644
sortParams.getOptional("sort_params")
672645

673-
/**
674-
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if
675-
* the server responded with an unexpected value).
676-
*/
677-
fun stream(): Optional<Boolean> = stream.getOptional("stream")
678-
679646
/**
680647
* Returns the raw JSON value of [sessionIds].
681648
*
@@ -751,13 +718,6 @@ private constructor(
751718
@ExcludeMissing
752719
fun _sortParams(): JsonField<SortParamsForRunsComparisonView> = sortParams
753720

754-
/**
755-
* Returns the raw JSON value of [stream].
756-
*
757-
* Unlike [stream], this method doesn't throw if the JSON field has an unexpected type.
758-
*/
759-
@JsonProperty("stream") @ExcludeMissing fun _stream(): JsonField<Boolean> = stream
760-
761721
@JsonAnySetter
762722
private fun putAdditionalProperty(key: String, value: JsonValue) {
763723
additionalProperties.put(key, value)
@@ -795,7 +755,6 @@ private constructor(
795755
private var offset: JsonField<Long> = JsonMissing.of()
796756
private var preview: JsonField<Boolean> = JsonMissing.of()
797757
private var sortParams: JsonField<SortParamsForRunsComparisonView> = JsonMissing.of()
798-
private var stream: JsonField<Boolean> = JsonMissing.of()
799758
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
800759

801760
@JvmSynthetic
@@ -809,7 +768,6 @@ private constructor(
809768
offset = body.offset
810769
preview = body.preview
811770
sortParams = body.sortParams
812-
stream = body.stream
813771
additionalProperties = body.additionalProperties.toMutableMap()
814772
}
815773

@@ -976,17 +934,6 @@ private constructor(
976934
this.sortParams = sortParams
977935
}
978936

979-
fun stream(stream: Boolean) = stream(JsonField.of(stream))
980-
981-
/**
982-
* Sets [Builder.stream] to an arbitrary JSON value.
983-
*
984-
* You should usually call [Builder.stream] with a well-typed [Boolean] value instead.
985-
* This method is primarily for setting the field to an undocumented or not yet
986-
* supported value.
987-
*/
988-
fun stream(stream: JsonField<Boolean>) = apply { this.stream = stream }
989-
990937
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
991938
this.additionalProperties.clear()
992939
putAllAdditionalProperties(additionalProperties)
@@ -1029,7 +976,6 @@ private constructor(
1029976
offset,
1030977
preview,
1031978
sortParams,
1032-
stream,
1033979
additionalProperties.toMutableMap(),
1034980
)
1035981
}
@@ -1050,7 +996,6 @@ private constructor(
1050996
offset()
1051997
preview()
1052998
sortParams().ifPresent { it.validate() }
1053-
stream()
1054999
validated = true
10551000
}
10561001

@@ -1078,8 +1023,7 @@ private constructor(
10781023
(if (limit.asKnown().isPresent) 1 else 0) +
10791024
(if (offset.asKnown().isPresent) 1 else 0) +
10801025
(if (preview.asKnown().isPresent) 1 else 0) +
1081-
(sortParams.asKnown().getOrNull()?.validity() ?: 0) +
1082-
(if (stream.asKnown().isPresent) 1 else 0)
1026+
(sortParams.asKnown().getOrNull()?.validity() ?: 0)
10831027

10841028
override fun equals(other: Any?): Boolean {
10851029
if (this === other) {
@@ -1096,7 +1040,6 @@ private constructor(
10961040
offset == other.offset &&
10971041
preview == other.preview &&
10981042
sortParams == other.sortParams &&
1099-
stream == other.stream &&
11001043
additionalProperties == other.additionalProperties
11011044
}
11021045

@@ -1111,15 +1054,14 @@ private constructor(
11111054
offset,
11121055
preview,
11131056
sortParams,
1114-
stream,
11151057
additionalProperties,
11161058
)
11171059
}
11181060

11191061
override fun hashCode(): Int = hashCode
11201062

11211063
override fun toString() =
1122-
"Body{sessionIds=$sessionIds, comparativeExperimentId=$comparativeExperimentId, exampleIds=$exampleIds, filters=$filters, includeAnnotatorDetail=$includeAnnotatorDetail, limit=$limit, offset=$offset, preview=$preview, sortParams=$sortParams, stream=$stream, additionalProperties=$additionalProperties}"
1064+
"Body{sessionIds=$sessionIds, comparativeExperimentId=$comparativeExperimentId, exampleIds=$exampleIds, filters=$filters, includeAnnotatorDetail=$includeAnnotatorDetail, limit=$limit, offset=$offset, preview=$preview, sortParams=$sortParams, additionalProperties=$additionalProperties}"
11231065
}
11241066

11251067
class Filters

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ internal class QueryExampleSchemaWithRunsTest {
3333
.sortOrder(SortParamsForRunsComparisonView.SortOrder.ASC)
3434
.build()
3535
)
36-
.stream(true)
3736
.build()
3837

3938
assertThat(queryExampleSchemaWithRuns.sessionIds())
@@ -59,7 +58,6 @@ internal class QueryExampleSchemaWithRunsTest {
5958
.sortOrder(SortParamsForRunsComparisonView.SortOrder.ASC)
6059
.build()
6160
)
62-
assertThat(queryExampleSchemaWithRuns.stream()).contains(true)
6361
}
6462

6563
@Test
@@ -85,7 +83,6 @@ internal class QueryExampleSchemaWithRunsTest {
8583
.sortOrder(SortParamsForRunsComparisonView.SortOrder.ASC)
8684
.build()
8785
)
88-
.stream(true)
8986
.build()
9087

9188
val roundtrippedQueryExampleSchemaWithRuns =

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ internal class RunCreateParamsTest {
3333
.sortOrder(SortParamsForRunsComparisonView.SortOrder.ASC)
3434
.build()
3535
)
36-
.stream(true)
3736
.build()
3837
}
3938

@@ -74,7 +73,6 @@ internal class RunCreateParamsTest {
7473
.sortOrder(SortParamsForRunsComparisonView.SortOrder.ASC)
7574
.build()
7675
)
77-
.stream(true)
7876
.build()
7977

8078
val queryParams = params._queryParams()
@@ -119,7 +117,6 @@ internal class RunCreateParamsTest {
119117
.sortOrder(SortParamsForRunsComparisonView.SortOrder.ASC)
120118
.build()
121119
)
122-
.stream(true)
123120
.build()
124121

125122
val body = params._body()
@@ -145,7 +142,6 @@ internal class RunCreateParamsTest {
145142
.sortOrder(SortParamsForRunsComparisonView.SortOrder.ASC)
146143
.build()
147144
)
148-
assertThat(body.stream()).contains(true)
149145
}
150146

151147
@Test

langsmith-java-core/src/test/kotlin/com/langchain/smith/services/async/datasets/RunServiceAsyncTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ internal class RunServiceAsyncTest {
4848
.sortOrder(SortParamsForRunsComparisonView.SortOrder.ASC)
4949
.build()
5050
)
51-
.stream(true)
5251
.build()
5352
)
5453

0 commit comments

Comments
 (0)