Skip to content

Commit 979e8af

Browse files
feat(api): api update
1 parent 49bc020 commit 979e8af

3 files changed

Lines changed: 91 additions & 3 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: 102
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-3baf0b5b3249e3e46c4b933ff62824a9096b4b6ead7b45f1779d96670bdd68b9.yml
3-
openapi_spec_hash: 6621ca9c214ce3afdd12917a3d9ae7c0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-923e5b272457a65d68f7e43030dd0db3a9abfa79bded7832a0e54771c8757671.yml
3+
openapi_spec_hash: c0d627562d35dcf4b5823c4f5a2d4fba
44
config_hash: 787a12876983a14bce67ed57899e4a94

langsmith-java-core/src/main/kotlin/com/langchain/smith/models/annotationqueues/RunSchemaWithAnnotationQueueInfo.kt

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ private constructor(
3737
private val traceId: JsonField<String>,
3838
private val addedAt: JsonField<OffsetDateTime>,
3939
private val childRunIds: JsonField<List<String>>,
40+
private val completedCount: JsonField<Long>,
4041
private val completionCost: JsonField<String>,
4142
private val completionCostDetails: JsonField<CompletionCostDetails>,
4243
private val completionTokenDetails: JsonField<CompletionTokenDetails>,
@@ -71,6 +72,7 @@ private constructor(
7172
private val promptTokens: JsonField<Long>,
7273
private val referenceDatasetId: JsonField<String>,
7374
private val referenceExampleId: JsonField<String>,
75+
private val reservationCount: JsonField<Long>,
7476
private val s3Urls: JsonField<S3Urls>,
7577
private val serialized: JsonField<Serialized>,
7678
private val shareToken: JsonField<String>,
@@ -111,6 +113,9 @@ private constructor(
111113
@JsonProperty("child_run_ids")
112114
@ExcludeMissing
113115
childRunIds: JsonField<List<String>> = JsonMissing.of(),
116+
@JsonProperty("completed_count")
117+
@ExcludeMissing
118+
completedCount: JsonField<Long> = JsonMissing.of(),
114119
@JsonProperty("completion_cost")
115120
@ExcludeMissing
116121
completionCost: JsonField<String> = JsonMissing.of(),
@@ -203,6 +208,9 @@ private constructor(
203208
@JsonProperty("reference_example_id")
204209
@ExcludeMissing
205210
referenceExampleId: JsonField<String> = JsonMissing.of(),
211+
@JsonProperty("reservation_count")
212+
@ExcludeMissing
213+
reservationCount: JsonField<Long> = JsonMissing.of(),
206214
@JsonProperty("s3_urls") @ExcludeMissing s3Urls: JsonField<S3Urls> = JsonMissing.of(),
207215
@JsonProperty("serialized")
208216
@ExcludeMissing
@@ -247,6 +255,7 @@ private constructor(
247255
traceId,
248256
addedAt,
249257
childRunIds,
258+
completedCount,
250259
completionCost,
251260
completionCostDetails,
252261
completionTokenDetails,
@@ -281,6 +290,7 @@ private constructor(
281290
promptTokens,
282291
referenceDatasetId,
283292
referenceExampleId,
293+
reservationCount,
284294
s3Urls,
285295
serialized,
286296
shareToken,
@@ -366,6 +376,12 @@ private constructor(
366376
*/
367377
fun childRunIds(): Optional<List<String>> = childRunIds.getOptional("child_run_ids")
368378

379+
/**
380+
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
381+
* server responded with an unexpected value).
382+
*/
383+
fun completedCount(): Optional<Long> = completedCount.getOptional("completed_count")
384+
369385
/**
370386
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
371387
* server responded with an unexpected value).
@@ -579,6 +595,12 @@ private constructor(
579595
fun referenceExampleId(): Optional<String> =
580596
referenceExampleId.getOptional("reference_example_id")
581597

598+
/**
599+
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
600+
* server responded with an unexpected value).
601+
*/
602+
fun reservationCount(): Optional<Long> = reservationCount.getOptional("reservation_count")
603+
582604
/**
583605
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
584606
* server responded with an unexpected value).
@@ -747,6 +769,15 @@ private constructor(
747769
@ExcludeMissing
748770
fun _childRunIds(): JsonField<List<String>> = childRunIds
749771

772+
/**
773+
* Returns the raw JSON value of [completedCount].
774+
*
775+
* Unlike [completedCount], this method doesn't throw if the JSON field has an unexpected type.
776+
*/
777+
@JsonProperty("completed_count")
778+
@ExcludeMissing
779+
fun _completedCount(): JsonField<Long> = completedCount
780+
750781
/**
751782
* Returns the raw JSON value of [completionCost].
752783
*
@@ -1043,6 +1074,16 @@ private constructor(
10431074
@ExcludeMissing
10441075
fun _referenceExampleId(): JsonField<String> = referenceExampleId
10451076

1077+
/**
1078+
* Returns the raw JSON value of [reservationCount].
1079+
*
1080+
* Unlike [reservationCount], this method doesn't throw if the JSON field has an unexpected
1081+
* type.
1082+
*/
1083+
@JsonProperty("reservation_count")
1084+
@ExcludeMissing
1085+
fun _reservationCount(): JsonField<Long> = reservationCount
1086+
10461087
/**
10471088
* Returns the raw JSON value of [s3Urls].
10481089
*
@@ -1204,6 +1245,7 @@ private constructor(
12041245
private var traceId: JsonField<String>? = null
12051246
private var addedAt: JsonField<OffsetDateTime> = JsonMissing.of()
12061247
private var childRunIds: JsonField<MutableList<String>>? = null
1248+
private var completedCount: JsonField<Long> = JsonMissing.of()
12071249
private var completionCost: JsonField<String> = JsonMissing.of()
12081250
private var completionCostDetails: JsonField<CompletionCostDetails> = JsonMissing.of()
12091251
private var completionTokenDetails: JsonField<CompletionTokenDetails> = JsonMissing.of()
@@ -1238,6 +1280,7 @@ private constructor(
12381280
private var promptTokens: JsonField<Long> = JsonMissing.of()
12391281
private var referenceDatasetId: JsonField<String> = JsonMissing.of()
12401282
private var referenceExampleId: JsonField<String> = JsonMissing.of()
1283+
private var reservationCount: JsonField<Long> = JsonMissing.of()
12411284
private var s3Urls: JsonField<S3Urls> = JsonMissing.of()
12421285
private var serialized: JsonField<Serialized> = JsonMissing.of()
12431286
private var shareToken: JsonField<String> = JsonMissing.of()
@@ -1269,6 +1312,7 @@ private constructor(
12691312
addedAt = runSchemaWithAnnotationQueueInfo.addedAt
12701313
childRunIds =
12711314
runSchemaWithAnnotationQueueInfo.childRunIds.map { it.toMutableList() }
1315+
completedCount = runSchemaWithAnnotationQueueInfo.completedCount
12721316
completionCost = runSchemaWithAnnotationQueueInfo.completionCost
12731317
completionCostDetails = runSchemaWithAnnotationQueueInfo.completionCostDetails
12741318
completionTokenDetails = runSchemaWithAnnotationQueueInfo.completionTokenDetails
@@ -1305,6 +1349,7 @@ private constructor(
13051349
promptTokens = runSchemaWithAnnotationQueueInfo.promptTokens
13061350
referenceDatasetId = runSchemaWithAnnotationQueueInfo.referenceDatasetId
13071351
referenceExampleId = runSchemaWithAnnotationQueueInfo.referenceExampleId
1352+
reservationCount = runSchemaWithAnnotationQueueInfo.reservationCount
13081353
s3Urls = runSchemaWithAnnotationQueueInfo.s3Urls
13091354
serialized = runSchemaWithAnnotationQueueInfo.serialized
13101355
shareToken = runSchemaWithAnnotationQueueInfo.shareToken
@@ -1460,6 +1505,19 @@ private constructor(
14601505
}
14611506
}
14621507

1508+
fun completedCount(completedCount: Long) = completedCount(JsonField.of(completedCount))
1509+
1510+
/**
1511+
* Sets [Builder.completedCount] to an arbitrary JSON value.
1512+
*
1513+
* You should usually call [Builder.completedCount] with a well-typed [Long] value instead.
1514+
* This method is primarily for setting the field to an undocumented or not yet supported
1515+
* value.
1516+
*/
1517+
fun completedCount(completedCount: JsonField<Long>) = apply {
1518+
this.completedCount = completedCount
1519+
}
1520+
14631521
fun completionCost(completionCost: String?) =
14641522
completionCost(JsonField.ofNullable(completionCost))
14651523

@@ -2076,6 +2134,20 @@ private constructor(
20762134
this.referenceExampleId = referenceExampleId
20772135
}
20782136

2137+
fun reservationCount(reservationCount: Long) =
2138+
reservationCount(JsonField.of(reservationCount))
2139+
2140+
/**
2141+
* Sets [Builder.reservationCount] to an arbitrary JSON value.
2142+
*
2143+
* You should usually call [Builder.reservationCount] with a well-typed [Long] value
2144+
* instead. This method is primarily for setting the field to an undocumented or not yet
2145+
* supported value.
2146+
*/
2147+
fun reservationCount(reservationCount: JsonField<Long>) = apply {
2148+
this.reservationCount = reservationCount
2149+
}
2150+
20792151
fun s3Urls(s3Urls: S3Urls?) = s3Urls(JsonField.ofNullable(s3Urls))
20802152

20812153
/** Alias for calling [Builder.s3Urls] with `s3Urls.orElse(null)`. */
@@ -2347,6 +2419,7 @@ private constructor(
23472419
checkRequired("traceId", traceId),
23482420
addedAt,
23492421
(childRunIds ?: JsonMissing.of()).map { it.toImmutable() },
2422+
completedCount,
23502423
completionCost,
23512424
completionCostDetails,
23522425
completionTokenDetails,
@@ -2381,6 +2454,7 @@ private constructor(
23812454
promptTokens,
23822455
referenceDatasetId,
23832456
referenceExampleId,
2457+
reservationCount,
23842458
s3Urls,
23852459
serialized,
23862460
shareToken,
@@ -2417,6 +2491,7 @@ private constructor(
24172491
traceId()
24182492
addedAt()
24192493
childRunIds()
2494+
completedCount()
24202495
completionCost()
24212496
completionCostDetails().ifPresent { it.validate() }
24222497
completionTokenDetails().ifPresent { it.validate() }
@@ -2451,6 +2526,7 @@ private constructor(
24512526
promptTokens()
24522527
referenceDatasetId()
24532528
referenceExampleId()
2529+
reservationCount()
24542530
s3Urls().ifPresent { it.validate() }
24552531
serialized().ifPresent { it.validate() }
24562532
shareToken()
@@ -2494,6 +2570,7 @@ private constructor(
24942570
(if (traceId.asKnown().isPresent) 1 else 0) +
24952571
(if (addedAt.asKnown().isPresent) 1 else 0) +
24962572
(childRunIds.asKnown().getOrNull()?.size ?: 0) +
2573+
(if (completedCount.asKnown().isPresent) 1 else 0) +
24972574
(if (completionCost.asKnown().isPresent) 1 else 0) +
24982575
(completionCostDetails.asKnown().getOrNull()?.validity() ?: 0) +
24992576
(completionTokenDetails.asKnown().getOrNull()?.validity() ?: 0) +
@@ -2528,6 +2605,7 @@ private constructor(
25282605
(if (promptTokens.asKnown().isPresent) 1 else 0) +
25292606
(if (referenceDatasetId.asKnown().isPresent) 1 else 0) +
25302607
(if (referenceExampleId.asKnown().isPresent) 1 else 0) +
2608+
(if (reservationCount.asKnown().isPresent) 1 else 0) +
25312609
(s3Urls.asKnown().getOrNull()?.validity() ?: 0) +
25322610
(serialized.asKnown().getOrNull()?.validity() ?: 0) +
25332611
(if (shareToken.asKnown().isPresent) 1 else 0) +
@@ -4085,6 +4163,7 @@ private constructor(
40854163
traceId == other.traceId &&
40864164
addedAt == other.addedAt &&
40874165
childRunIds == other.childRunIds &&
4166+
completedCount == other.completedCount &&
40884167
completionCost == other.completionCost &&
40894168
completionCostDetails == other.completionCostDetails &&
40904169
completionTokenDetails == other.completionTokenDetails &&
@@ -4119,6 +4198,7 @@ private constructor(
41194198
promptTokens == other.promptTokens &&
41204199
referenceDatasetId == other.referenceDatasetId &&
41214200
referenceExampleId == other.referenceExampleId &&
4201+
reservationCount == other.reservationCount &&
41224202
s3Urls == other.s3Urls &&
41234203
serialized == other.serialized &&
41244204
shareToken == other.shareToken &&
@@ -4149,6 +4229,7 @@ private constructor(
41494229
traceId,
41504230
addedAt,
41514231
childRunIds,
4232+
completedCount,
41524233
completionCost,
41534234
completionCostDetails,
41544235
completionTokenDetails,
@@ -4183,6 +4264,7 @@ private constructor(
41834264
promptTokens,
41844265
referenceDatasetId,
41854266
referenceExampleId,
4267+
reservationCount,
41864268
s3Urls,
41874269
serialized,
41884270
shareToken,
@@ -4204,5 +4286,5 @@ private constructor(
42044286
override fun hashCode(): Int = hashCode
42054287

42064288
override fun toString() =
4207-
"RunSchemaWithAnnotationQueueInfo{id=$id, appPath=$appPath, dottedOrder=$dottedOrder, name=$name, queueRunId=$queueRunId, runType=$runType, sessionId=$sessionId, status=$status, traceId=$traceId, addedAt=$addedAt, childRunIds=$childRunIds, completionCost=$completionCost, completionCostDetails=$completionCostDetails, completionTokenDetails=$completionTokenDetails, completionTokens=$completionTokens, directChildRunIds=$directChildRunIds, effectiveAddedAt=$effectiveAddedAt, endTime=$endTime, error=$error, events=$events, executionOrder=$executionOrder, extra=$extra, feedbackStats=$feedbackStats, firstTokenTime=$firstTokenTime, inDataset=$inDataset, inputs=$inputs, inputsPreview=$inputsPreview, inputsS3Urls=$inputsS3Urls, lastQueuedAt=$lastQueuedAt, lastReviewedTime=$lastReviewedTime, manifestId=$manifestId, manifestS3Id=$manifestS3Id, messages=$messages, outputs=$outputs, outputsPreview=$outputsPreview, outputsS3Urls=$outputsS3Urls, parentRunId=$parentRunId, parentRunIds=$parentRunIds, priceModelId=$priceModelId, promptCost=$promptCost, promptCostDetails=$promptCostDetails, promptTokenDetails=$promptTokenDetails, promptTokens=$promptTokens, referenceDatasetId=$referenceDatasetId, referenceExampleId=$referenceExampleId, s3Urls=$s3Urls, serialized=$serialized, shareToken=$shareToken, startTime=$startTime, tags=$tags, threadId=$threadId, totalCost=$totalCost, totalTokens=$totalTokens, traceFirstReceivedAt=$traceFirstReceivedAt, traceMaxStartTime=$traceMaxStartTime, traceMinStartTime=$traceMinStartTime, traceTier=$traceTier, traceUpgrade=$traceUpgrade, ttlSeconds=$ttlSeconds, additionalProperties=$additionalProperties}"
4289+
"RunSchemaWithAnnotationQueueInfo{id=$id, appPath=$appPath, dottedOrder=$dottedOrder, name=$name, queueRunId=$queueRunId, runType=$runType, sessionId=$sessionId, status=$status, traceId=$traceId, addedAt=$addedAt, childRunIds=$childRunIds, completedCount=$completedCount, completionCost=$completionCost, completionCostDetails=$completionCostDetails, completionTokenDetails=$completionTokenDetails, completionTokens=$completionTokens, directChildRunIds=$directChildRunIds, effectiveAddedAt=$effectiveAddedAt, endTime=$endTime, error=$error, events=$events, executionOrder=$executionOrder, extra=$extra, feedbackStats=$feedbackStats, firstTokenTime=$firstTokenTime, inDataset=$inDataset, inputs=$inputs, inputsPreview=$inputsPreview, inputsS3Urls=$inputsS3Urls, lastQueuedAt=$lastQueuedAt, lastReviewedTime=$lastReviewedTime, manifestId=$manifestId, manifestS3Id=$manifestS3Id, messages=$messages, outputs=$outputs, outputsPreview=$outputsPreview, outputsS3Urls=$outputsS3Urls, parentRunId=$parentRunId, parentRunIds=$parentRunIds, priceModelId=$priceModelId, promptCost=$promptCost, promptCostDetails=$promptCostDetails, promptTokenDetails=$promptTokenDetails, promptTokens=$promptTokens, referenceDatasetId=$referenceDatasetId, referenceExampleId=$referenceExampleId, reservationCount=$reservationCount, s3Urls=$s3Urls, serialized=$serialized, shareToken=$shareToken, startTime=$startTime, tags=$tags, threadId=$threadId, totalCost=$totalCost, totalTokens=$totalTokens, traceFirstReceivedAt=$traceFirstReceivedAt, traceMaxStartTime=$traceMaxStartTime, traceMinStartTime=$traceMinStartTime, traceTier=$traceTier, traceUpgrade=$traceUpgrade, ttlSeconds=$ttlSeconds, additionalProperties=$additionalProperties}"
42084290
}

langsmith-java-core/src/test/kotlin/com/langchain/smith/models/annotationqueues/RunSchemaWithAnnotationQueueInfoTest.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ internal class RunSchemaWithAnnotationQueueInfoTest {
2828
.traceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
2929
.addedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
3030
.addChildRunId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
31+
.completedCount(0L)
3132
.completionCost("completion_cost")
3233
.completionCostDetails(
3334
RunSchemaWithAnnotationQueueInfo.CompletionCostDetails.builder()
@@ -110,6 +111,7 @@ internal class RunSchemaWithAnnotationQueueInfoTest {
110111
.promptTokens(0L)
111112
.referenceDatasetId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
112113
.referenceExampleId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
114+
.reservationCount(0L)
113115
.s3Urls(
114116
RunSchemaWithAnnotationQueueInfo.S3Urls.builder()
115117
.putAdditionalProperty("foo", JsonValue.from("bar"))
@@ -151,6 +153,7 @@ internal class RunSchemaWithAnnotationQueueInfoTest {
151153
.contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
152154
assertThat(runSchemaWithAnnotationQueueInfo.childRunIds().getOrNull())
153155
.containsExactly("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
156+
assertThat(runSchemaWithAnnotationQueueInfo.completedCount()).contains(0L)
154157
assertThat(runSchemaWithAnnotationQueueInfo.completionCost()).contains("completion_cost")
155158
assertThat(runSchemaWithAnnotationQueueInfo.completionCostDetails())
156159
.contains(
@@ -258,6 +261,7 @@ internal class RunSchemaWithAnnotationQueueInfoTest {
258261
.contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
259262
assertThat(runSchemaWithAnnotationQueueInfo.referenceExampleId())
260263
.contains("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
264+
assertThat(runSchemaWithAnnotationQueueInfo.reservationCount()).contains(0L)
261265
assertThat(runSchemaWithAnnotationQueueInfo.s3Urls())
262266
.contains(
263267
RunSchemaWithAnnotationQueueInfo.S3Urls.builder()
@@ -306,6 +310,7 @@ internal class RunSchemaWithAnnotationQueueInfoTest {
306310
.traceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
307311
.addedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
308312
.addChildRunId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
313+
.completedCount(0L)
309314
.completionCost("completion_cost")
310315
.completionCostDetails(
311316
RunSchemaWithAnnotationQueueInfo.CompletionCostDetails.builder()
@@ -388,6 +393,7 @@ internal class RunSchemaWithAnnotationQueueInfoTest {
388393
.promptTokens(0L)
389394
.referenceDatasetId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
390395
.referenceExampleId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
396+
.reservationCount(0L)
391397
.s3Urls(
392398
RunSchemaWithAnnotationQueueInfo.S3Urls.builder()
393399
.putAdditionalProperty("foo", JsonValue.from("bar"))

0 commit comments

Comments
 (0)