Skip to content

Commit 9182ef8

Browse files
feat(api): api update
1 parent 0c91488 commit 9182ef8

3 files changed

Lines changed: 80 additions & 55 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-4d7b0427f9ed66e112fcc2f2a3a91e7f2c8113eb6386910c48b52ef7a605b282.yml
3-
openapi_spec_hash: 601517cba6d1a4f06c494f42f11e3f96
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-eb465fc8d3cc8b7ba8c49bc30a90458a2fe02b4d5612c035eec9fb398246f107.yml
3+
openapi_spec_hash: 6bd1e295b4d88bc902572b946f3706b6
44
config_hash: c217b34d458f1b65f260715693d447f9

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

Lines changed: 70 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +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>,
40+
private val completedBy: JsonField<List<String>>,
4141
private val completionCost: JsonField<String>,
4242
private val completionCostDetails: JsonField<CompletionCostDetails>,
4343
private val completionTokenDetails: JsonField<CompletionTokenDetails>,
@@ -72,7 +72,7 @@ private constructor(
7272
private val promptTokens: JsonField<Long>,
7373
private val referenceDatasetId: JsonField<String>,
7474
private val referenceExampleId: JsonField<String>,
75-
private val reservationCount: JsonField<Long>,
75+
private val reservedBy: JsonField<List<String>>,
7676
private val s3Urls: JsonField<S3Urls>,
7777
private val serialized: JsonField<Serialized>,
7878
private val shareToken: JsonField<String>,
@@ -113,9 +113,9 @@ private constructor(
113113
@JsonProperty("child_run_ids")
114114
@ExcludeMissing
115115
childRunIds: JsonField<List<String>> = JsonMissing.of(),
116-
@JsonProperty("completed_count")
116+
@JsonProperty("completed_by")
117117
@ExcludeMissing
118-
completedCount: JsonField<Long> = JsonMissing.of(),
118+
completedBy: JsonField<List<String>> = JsonMissing.of(),
119119
@JsonProperty("completion_cost")
120120
@ExcludeMissing
121121
completionCost: JsonField<String> = JsonMissing.of(),
@@ -208,9 +208,9 @@ private constructor(
208208
@JsonProperty("reference_example_id")
209209
@ExcludeMissing
210210
referenceExampleId: JsonField<String> = JsonMissing.of(),
211-
@JsonProperty("reservation_count")
211+
@JsonProperty("reserved_by")
212212
@ExcludeMissing
213-
reservationCount: JsonField<Long> = JsonMissing.of(),
213+
reservedBy: JsonField<List<String>> = JsonMissing.of(),
214214
@JsonProperty("s3_urls") @ExcludeMissing s3Urls: JsonField<S3Urls> = JsonMissing.of(),
215215
@JsonProperty("serialized")
216216
@ExcludeMissing
@@ -255,7 +255,7 @@ private constructor(
255255
traceId,
256256
addedAt,
257257
childRunIds,
258-
completedCount,
258+
completedBy,
259259
completionCost,
260260
completionCostDetails,
261261
completionTokenDetails,
@@ -290,7 +290,7 @@ private constructor(
290290
promptTokens,
291291
referenceDatasetId,
292292
referenceExampleId,
293-
reservationCount,
293+
reservedBy,
294294
s3Urls,
295295
serialized,
296296
shareToken,
@@ -380,7 +380,7 @@ private constructor(
380380
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
381381
* server responded with an unexpected value).
382382
*/
383-
fun completedCount(): Optional<Long> = completedCount.getOptional("completed_count")
383+
fun completedBy(): Optional<List<String>> = completedBy.getOptional("completed_by")
384384

385385
/**
386386
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
@@ -599,7 +599,7 @@ private constructor(
599599
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
600600
* server responded with an unexpected value).
601601
*/
602-
fun reservationCount(): Optional<Long> = reservationCount.getOptional("reservation_count")
602+
fun reservedBy(): Optional<List<String>> = reservedBy.getOptional("reserved_by")
603603

604604
/**
605605
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
@@ -770,13 +770,13 @@ private constructor(
770770
fun _childRunIds(): JsonField<List<String>> = childRunIds
771771

772772
/**
773-
* Returns the raw JSON value of [completedCount].
773+
* Returns the raw JSON value of [completedBy].
774774
*
775-
* Unlike [completedCount], this method doesn't throw if the JSON field has an unexpected type.
775+
* Unlike [completedBy], this method doesn't throw if the JSON field has an unexpected type.
776776
*/
777-
@JsonProperty("completed_count")
777+
@JsonProperty("completed_by")
778778
@ExcludeMissing
779-
fun _completedCount(): JsonField<Long> = completedCount
779+
fun _completedBy(): JsonField<List<String>> = completedBy
780780

781781
/**
782782
* Returns the raw JSON value of [completionCost].
@@ -1075,14 +1075,13 @@ private constructor(
10751075
fun _referenceExampleId(): JsonField<String> = referenceExampleId
10761076

10771077
/**
1078-
* Returns the raw JSON value of [reservationCount].
1078+
* Returns the raw JSON value of [reservedBy].
10791079
*
1080-
* Unlike [reservationCount], this method doesn't throw if the JSON field has an unexpected
1081-
* type.
1080+
* Unlike [reservedBy], this method doesn't throw if the JSON field has an unexpected type.
10821081
*/
1083-
@JsonProperty("reservation_count")
1082+
@JsonProperty("reserved_by")
10841083
@ExcludeMissing
1085-
fun _reservationCount(): JsonField<Long> = reservationCount
1084+
fun _reservedBy(): JsonField<List<String>> = reservedBy
10861085

10871086
/**
10881087
* Returns the raw JSON value of [s3Urls].
@@ -1245,7 +1244,7 @@ private constructor(
12451244
private var traceId: JsonField<String>? = null
12461245
private var addedAt: JsonField<OffsetDateTime> = JsonMissing.of()
12471246
private var childRunIds: JsonField<MutableList<String>>? = null
1248-
private var completedCount: JsonField<Long> = JsonMissing.of()
1247+
private var completedBy: JsonField<MutableList<String>>? = null
12491248
private var completionCost: JsonField<String> = JsonMissing.of()
12501249
private var completionCostDetails: JsonField<CompletionCostDetails> = JsonMissing.of()
12511250
private var completionTokenDetails: JsonField<CompletionTokenDetails> = JsonMissing.of()
@@ -1280,7 +1279,7 @@ private constructor(
12801279
private var promptTokens: JsonField<Long> = JsonMissing.of()
12811280
private var referenceDatasetId: JsonField<String> = JsonMissing.of()
12821281
private var referenceExampleId: JsonField<String> = JsonMissing.of()
1283-
private var reservationCount: JsonField<Long> = JsonMissing.of()
1282+
private var reservedBy: JsonField<MutableList<String>>? = null
12841283
private var s3Urls: JsonField<S3Urls> = JsonMissing.of()
12851284
private var serialized: JsonField<Serialized> = JsonMissing.of()
12861285
private var shareToken: JsonField<String> = JsonMissing.of()
@@ -1312,7 +1311,8 @@ private constructor(
13121311
addedAt = runSchemaWithAnnotationQueueInfo.addedAt
13131312
childRunIds =
13141313
runSchemaWithAnnotationQueueInfo.childRunIds.map { it.toMutableList() }
1315-
completedCount = runSchemaWithAnnotationQueueInfo.completedCount
1314+
completedBy =
1315+
runSchemaWithAnnotationQueueInfo.completedBy.map { it.toMutableList() }
13161316
completionCost = runSchemaWithAnnotationQueueInfo.completionCost
13171317
completionCostDetails = runSchemaWithAnnotationQueueInfo.completionCostDetails
13181318
completionTokenDetails = runSchemaWithAnnotationQueueInfo.completionTokenDetails
@@ -1349,7 +1349,7 @@ private constructor(
13491349
promptTokens = runSchemaWithAnnotationQueueInfo.promptTokens
13501350
referenceDatasetId = runSchemaWithAnnotationQueueInfo.referenceDatasetId
13511351
referenceExampleId = runSchemaWithAnnotationQueueInfo.referenceExampleId
1352-
reservationCount = runSchemaWithAnnotationQueueInfo.reservationCount
1352+
reservedBy = runSchemaWithAnnotationQueueInfo.reservedBy.map { it.toMutableList() }
13531353
s3Urls = runSchemaWithAnnotationQueueInfo.s3Urls
13541354
serialized = runSchemaWithAnnotationQueueInfo.serialized
13551355
shareToken = runSchemaWithAnnotationQueueInfo.shareToken
@@ -1505,17 +1505,29 @@ private constructor(
15051505
}
15061506
}
15071507

1508-
fun completedCount(completedCount: Long) = completedCount(JsonField.of(completedCount))
1508+
fun completedBy(completedBy: List<String>) = completedBy(JsonField.of(completedBy))
15091509

15101510
/**
1511-
* Sets [Builder.completedCount] to an arbitrary JSON value.
1511+
* Sets [Builder.completedBy] to an arbitrary JSON value.
15121512
*
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.
1513+
* You should usually call [Builder.completedBy] with a well-typed `List<String>` value
1514+
* instead. This method is primarily for setting the field to an undocumented or not yet
1515+
* supported value.
15161516
*/
1517-
fun completedCount(completedCount: JsonField<Long>) = apply {
1518-
this.completedCount = completedCount
1517+
fun completedBy(completedBy: JsonField<List<String>>) = apply {
1518+
this.completedBy = completedBy.map { it.toMutableList() }
1519+
}
1520+
1521+
/**
1522+
* Adds a single [String] to [Builder.completedBy].
1523+
*
1524+
* @throws IllegalStateException if the field was previously set to a non-list.
1525+
*/
1526+
fun addCompletedBy(completedBy: String) = apply {
1527+
this.completedBy =
1528+
(this.completedBy ?: JsonField.of(mutableListOf())).also {
1529+
checkKnown("completedBy", it).add(completedBy)
1530+
}
15191531
}
15201532

15211533
fun completionCost(completionCost: String?) =
@@ -2134,18 +2146,29 @@ private constructor(
21342146
this.referenceExampleId = referenceExampleId
21352147
}
21362148

2137-
fun reservationCount(reservationCount: Long) =
2138-
reservationCount(JsonField.of(reservationCount))
2149+
fun reservedBy(reservedBy: List<String>) = reservedBy(JsonField.of(reservedBy))
21392150

21402151
/**
2141-
* Sets [Builder.reservationCount] to an arbitrary JSON value.
2152+
* Sets [Builder.reservedBy] to an arbitrary JSON value.
21422153
*
2143-
* You should usually call [Builder.reservationCount] with a well-typed [Long] value
2154+
* You should usually call [Builder.reservedBy] with a well-typed `List<String>` value
21442155
* instead. This method is primarily for setting the field to an undocumented or not yet
21452156
* supported value.
21462157
*/
2147-
fun reservationCount(reservationCount: JsonField<Long>) = apply {
2148-
this.reservationCount = reservationCount
2158+
fun reservedBy(reservedBy: JsonField<List<String>>) = apply {
2159+
this.reservedBy = reservedBy.map { it.toMutableList() }
2160+
}
2161+
2162+
/**
2163+
* Adds a single [String] to [Builder.reservedBy].
2164+
*
2165+
* @throws IllegalStateException if the field was previously set to a non-list.
2166+
*/
2167+
fun addReservedBy(reservedBy: String) = apply {
2168+
this.reservedBy =
2169+
(this.reservedBy ?: JsonField.of(mutableListOf())).also {
2170+
checkKnown("reservedBy", it).add(reservedBy)
2171+
}
21492172
}
21502173

21512174
fun s3Urls(s3Urls: S3Urls?) = s3Urls(JsonField.ofNullable(s3Urls))
@@ -2419,7 +2442,7 @@ private constructor(
24192442
checkRequired("traceId", traceId),
24202443
addedAt,
24212444
(childRunIds ?: JsonMissing.of()).map { it.toImmutable() },
2422-
completedCount,
2445+
(completedBy ?: JsonMissing.of()).map { it.toImmutable() },
24232446
completionCost,
24242447
completionCostDetails,
24252448
completionTokenDetails,
@@ -2454,7 +2477,7 @@ private constructor(
24542477
promptTokens,
24552478
referenceDatasetId,
24562479
referenceExampleId,
2457-
reservationCount,
2480+
(reservedBy ?: JsonMissing.of()).map { it.toImmutable() },
24582481
s3Urls,
24592482
serialized,
24602483
shareToken,
@@ -2491,7 +2514,7 @@ private constructor(
24912514
traceId()
24922515
addedAt()
24932516
childRunIds()
2494-
completedCount()
2517+
completedBy()
24952518
completionCost()
24962519
completionCostDetails().ifPresent { it.validate() }
24972520
completionTokenDetails().ifPresent { it.validate() }
@@ -2526,7 +2549,7 @@ private constructor(
25262549
promptTokens()
25272550
referenceDatasetId()
25282551
referenceExampleId()
2529-
reservationCount()
2552+
reservedBy()
25302553
s3Urls().ifPresent { it.validate() }
25312554
serialized().ifPresent { it.validate() }
25322555
shareToken()
@@ -2570,7 +2593,7 @@ private constructor(
25702593
(if (traceId.asKnown().isPresent) 1 else 0) +
25712594
(if (addedAt.asKnown().isPresent) 1 else 0) +
25722595
(childRunIds.asKnown().getOrNull()?.size ?: 0) +
2573-
(if (completedCount.asKnown().isPresent) 1 else 0) +
2596+
(completedBy.asKnown().getOrNull()?.size ?: 0) +
25742597
(if (completionCost.asKnown().isPresent) 1 else 0) +
25752598
(completionCostDetails.asKnown().getOrNull()?.validity() ?: 0) +
25762599
(completionTokenDetails.asKnown().getOrNull()?.validity() ?: 0) +
@@ -2605,7 +2628,7 @@ private constructor(
26052628
(if (promptTokens.asKnown().isPresent) 1 else 0) +
26062629
(if (referenceDatasetId.asKnown().isPresent) 1 else 0) +
26072630
(if (referenceExampleId.asKnown().isPresent) 1 else 0) +
2608-
(if (reservationCount.asKnown().isPresent) 1 else 0) +
2631+
(reservedBy.asKnown().getOrNull()?.size ?: 0) +
26092632
(s3Urls.asKnown().getOrNull()?.validity() ?: 0) +
26102633
(serialized.asKnown().getOrNull()?.validity() ?: 0) +
26112634
(if (shareToken.asKnown().isPresent) 1 else 0) +
@@ -4163,7 +4186,7 @@ private constructor(
41634186
traceId == other.traceId &&
41644187
addedAt == other.addedAt &&
41654188
childRunIds == other.childRunIds &&
4166-
completedCount == other.completedCount &&
4189+
completedBy == other.completedBy &&
41674190
completionCost == other.completionCost &&
41684191
completionCostDetails == other.completionCostDetails &&
41694192
completionTokenDetails == other.completionTokenDetails &&
@@ -4198,7 +4221,7 @@ private constructor(
41984221
promptTokens == other.promptTokens &&
41994222
referenceDatasetId == other.referenceDatasetId &&
42004223
referenceExampleId == other.referenceExampleId &&
4201-
reservationCount == other.reservationCount &&
4224+
reservedBy == other.reservedBy &&
42024225
s3Urls == other.s3Urls &&
42034226
serialized == other.serialized &&
42044227
shareToken == other.shareToken &&
@@ -4229,7 +4252,7 @@ private constructor(
42294252
traceId,
42304253
addedAt,
42314254
childRunIds,
4232-
completedCount,
4255+
completedBy,
42334256
completionCost,
42344257
completionCostDetails,
42354258
completionTokenDetails,
@@ -4264,7 +4287,7 @@ private constructor(
42644287
promptTokens,
42654288
referenceDatasetId,
42664289
referenceExampleId,
4267-
reservationCount,
4290+
reservedBy,
42684291
s3Urls,
42694292
serialized,
42704293
shareToken,
@@ -4286,5 +4309,5 @@ private constructor(
42864309
override fun hashCode(): Int = hashCode
42874310

42884311
override fun toString() =
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}"
4312+
"RunSchemaWithAnnotationQueueInfo{id=$id, appPath=$appPath, dottedOrder=$dottedOrder, name=$name, queueRunId=$queueRunId, runType=$runType, sessionId=$sessionId, status=$status, traceId=$traceId, addedAt=$addedAt, childRunIds=$childRunIds, completedBy=$completedBy, 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, reservedBy=$reservedBy, 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}"
42904313
}

0 commit comments

Comments
 (0)