Skip to content

Commit 8198ce7

Browse files
feat(api): api update
1 parent d91305f commit 8198ce7

20 files changed

Lines changed: 1467 additions & 12 deletions

.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-dad7ecbfe311b828014fc6ad1ad4583c72ca6349041e080c3658889eb6c35bf2.yml
3-
openapi_spec_hash: 9e0bfc3dce4e093ee0c20950af3cb525
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/langsmith%2Flangsmith-api-631c3d1460babb2c8838070b1c2091ed4ebd07c2bee142361143e61c72d6a5c3.yml
3+
openapi_spec_hash: 9690b00860340088ff1aa297e1677997
44
config_hash: c217b34d458f1b65f260715693d447f9

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

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ private constructor(
8585
*/
8686
fun reservationMinutes(): Optional<Long> = body.reservationMinutes()
8787

88+
/**
89+
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
90+
* server responded with an unexpected value).
91+
*/
92+
fun reviewerAccessMode(): Optional<String> = body.reviewerAccessMode()
93+
8894
/**
8995
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if the
9096
* server responded with an unexpected value).
@@ -175,6 +181,14 @@ private constructor(
175181
*/
176182
fun _reservationMinutes(): JsonField<Long> = body._reservationMinutes()
177183

184+
/**
185+
* Returns the raw JSON value of [reviewerAccessMode].
186+
*
187+
* Unlike [reviewerAccessMode], this method doesn't throw if the JSON field has an unexpected
188+
* type.
189+
*/
190+
fun _reviewerAccessMode(): JsonField<String> = body._reviewerAccessMode()
191+
178192
/**
179193
* Returns the raw JSON value of [rubricInstructions].
180194
*
@@ -422,6 +436,21 @@ private constructor(
422436
body.reservationMinutes(reservationMinutes)
423437
}
424438

439+
fun reviewerAccessMode(reviewerAccessMode: String) = apply {
440+
body.reviewerAccessMode(reviewerAccessMode)
441+
}
442+
443+
/**
444+
* Sets [Builder.reviewerAccessMode] to an arbitrary JSON value.
445+
*
446+
* You should usually call [Builder.reviewerAccessMode] with a well-typed [String] value
447+
* instead. This method is primarily for setting the field to an undocumented or not yet
448+
* supported value.
449+
*/
450+
fun reviewerAccessMode(reviewerAccessMode: JsonField<String>) = apply {
451+
body.reviewerAccessMode(reviewerAccessMode)
452+
}
453+
425454
fun rubricInstructions(rubricInstructions: String?) = apply {
426455
body.rubricInstructions(rubricInstructions)
427456
}
@@ -659,6 +688,7 @@ private constructor(
659688
private val metadata: JsonField<Metadata>,
660689
private val numReviewersPerItem: JsonField<Long>,
661690
private val reservationMinutes: JsonField<Long>,
691+
private val reviewerAccessMode: JsonField<String>,
662692
private val rubricInstructions: JsonField<String>,
663693
private val rubricItems: JsonField<List<AnnotationQueueRubricItemSchema>>,
664694
private val sessionIds: JsonField<List<String>>,
@@ -691,6 +721,9 @@ private constructor(
691721
@JsonProperty("reservation_minutes")
692722
@ExcludeMissing
693723
reservationMinutes: JsonField<Long> = JsonMissing.of(),
724+
@JsonProperty("reviewer_access_mode")
725+
@ExcludeMissing
726+
reviewerAccessMode: JsonField<String> = JsonMissing.of(),
694727
@JsonProperty("rubric_instructions")
695728
@ExcludeMissing
696729
rubricInstructions: JsonField<String> = JsonMissing.of(),
@@ -713,6 +746,7 @@ private constructor(
713746
metadata,
714747
numReviewersPerItem,
715748
reservationMinutes,
749+
reviewerAccessMode,
716750
rubricInstructions,
717751
rubricItems,
718752
sessionIds,
@@ -777,6 +811,13 @@ private constructor(
777811
fun reservationMinutes(): Optional<Long> =
778812
reservationMinutes.getOptional("reservation_minutes")
779813

814+
/**
815+
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if
816+
* the server responded with an unexpected value).
817+
*/
818+
fun reviewerAccessMode(): Optional<String> =
819+
reviewerAccessMode.getOptional("reviewer_access_mode")
820+
780821
/**
781822
* @throws LangChainInvalidDataException if the JSON field has an unexpected type (e.g. if
782823
* the server responded with an unexpected value).
@@ -882,6 +923,16 @@ private constructor(
882923
@ExcludeMissing
883924
fun _reservationMinutes(): JsonField<Long> = reservationMinutes
884925

926+
/**
927+
* Returns the raw JSON value of [reviewerAccessMode].
928+
*
929+
* Unlike [reviewerAccessMode], this method doesn't throw if the JSON field has an
930+
* unexpected type.
931+
*/
932+
@JsonProperty("reviewer_access_mode")
933+
@ExcludeMissing
934+
fun _reviewerAccessMode(): JsonField<String> = reviewerAccessMode
935+
885936
/**
886937
* Returns the raw JSON value of [rubricInstructions].
887938
*
@@ -956,6 +1007,7 @@ private constructor(
9561007
private var metadata: JsonField<Metadata> = JsonMissing.of()
9571008
private var numReviewersPerItem: JsonField<Long> = JsonMissing.of()
9581009
private var reservationMinutes: JsonField<Long> = JsonMissing.of()
1010+
private var reviewerAccessMode: JsonField<String> = JsonMissing.of()
9591011
private var rubricInstructions: JsonField<String> = JsonMissing.of()
9601012
private var rubricItems: JsonField<MutableList<AnnotationQueueRubricItemSchema>>? = null
9611013
private var sessionIds: JsonField<MutableList<String>>? = null
@@ -973,6 +1025,7 @@ private constructor(
9731025
metadata = body.metadata
9741026
numReviewersPerItem = body.numReviewersPerItem
9751027
reservationMinutes = body.reservationMinutes
1028+
reviewerAccessMode = body.reviewerAccessMode
9761029
rubricInstructions = body.rubricInstructions
9771030
rubricItems = body.rubricItems.map { it.toMutableList() }
9781031
sessionIds = body.sessionIds.map { it.toMutableList() }
@@ -1150,6 +1203,20 @@ private constructor(
11501203
this.reservationMinutes = reservationMinutes
11511204
}
11521205

1206+
fun reviewerAccessMode(reviewerAccessMode: String) =
1207+
reviewerAccessMode(JsonField.of(reviewerAccessMode))
1208+
1209+
/**
1210+
* Sets [Builder.reviewerAccessMode] to an arbitrary JSON value.
1211+
*
1212+
* You should usually call [Builder.reviewerAccessMode] with a well-typed [String] value
1213+
* instead. This method is primarily for setting the field to an undocumented or not yet
1214+
* supported value.
1215+
*/
1216+
fun reviewerAccessMode(reviewerAccessMode: JsonField<String>) = apply {
1217+
this.reviewerAccessMode = reviewerAccessMode
1218+
}
1219+
11531220
fun rubricInstructions(rubricInstructions: String?) =
11541221
rubricInstructions(JsonField.ofNullable(rubricInstructions))
11551222

@@ -1284,6 +1351,7 @@ private constructor(
12841351
metadata,
12851352
numReviewersPerItem,
12861353
reservationMinutes,
1354+
reviewerAccessMode,
12871355
rubricInstructions,
12881356
(rubricItems ?: JsonMissing.of()).map { it.toImmutable() },
12891357
(sessionIds ?: JsonMissing.of()).map { it.toImmutable() },
@@ -1308,6 +1376,7 @@ private constructor(
13081376
metadata().ifPresent { it.validate() }
13091377
numReviewersPerItem()
13101378
reservationMinutes()
1379+
reviewerAccessMode()
13111380
rubricInstructions()
13121381
rubricItems().ifPresent { it.forEach { it.validate() } }
13131382
sessionIds()
@@ -1340,6 +1409,7 @@ private constructor(
13401409
(metadata.asKnown().getOrNull()?.validity() ?: 0) +
13411410
(if (numReviewersPerItem.asKnown().isPresent) 1 else 0) +
13421411
(if (reservationMinutes.asKnown().isPresent) 1 else 0) +
1412+
(if (reviewerAccessMode.asKnown().isPresent) 1 else 0) +
13431413
(if (rubricInstructions.asKnown().isPresent) 1 else 0) +
13441414
(rubricItems.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
13451415
(sessionIds.asKnown().getOrNull()?.size ?: 0) +
@@ -1360,6 +1430,7 @@ private constructor(
13601430
metadata == other.metadata &&
13611431
numReviewersPerItem == other.numReviewersPerItem &&
13621432
reservationMinutes == other.reservationMinutes &&
1433+
reviewerAccessMode == other.reviewerAccessMode &&
13631434
rubricInstructions == other.rubricInstructions &&
13641435
rubricItems == other.rubricItems &&
13651436
sessionIds == other.sessionIds &&
@@ -1378,6 +1449,7 @@ private constructor(
13781449
metadata,
13791450
numReviewersPerItem,
13801451
reservationMinutes,
1452+
reviewerAccessMode,
13811453
rubricInstructions,
13821454
rubricItems,
13831455
sessionIds,
@@ -1389,7 +1461,7 @@ private constructor(
13891461
override fun hashCode(): Int = hashCode
13901462

13911463
override fun toString() =
1392-
"Body{name=$name, id=$id, createdAt=$createdAt, defaultDataset=$defaultDataset, description=$description, enableReservations=$enableReservations, metadata=$metadata, numReviewersPerItem=$numReviewersPerItem, reservationMinutes=$reservationMinutes, rubricInstructions=$rubricInstructions, rubricItems=$rubricItems, sessionIds=$sessionIds, updatedAt=$updatedAt, additionalProperties=$additionalProperties}"
1464+
"Body{name=$name, id=$id, createdAt=$createdAt, defaultDataset=$defaultDataset, description=$description, enableReservations=$enableReservations, metadata=$metadata, numReviewersPerItem=$numReviewersPerItem, reservationMinutes=$reservationMinutes, reviewerAccessMode=$reviewerAccessMode, rubricInstructions=$rubricInstructions, rubricItems=$rubricItems, sessionIds=$sessionIds, updatedAt=$updatedAt, additionalProperties=$additionalProperties}"
13931465
}
13941466

13951467
class Metadata

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

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import kotlin.jvm.optionals.getOrNull
1717
/** Get Annotation Queues */
1818
class AnnotationQueueRetrieveAnnotationQueuesParams
1919
private constructor(
20+
private val assignedToMe: Boolean?,
2021
private val datasetId: String?,
2122
private val ids: List<String>?,
2223
private val limit: Long?,
@@ -29,6 +30,8 @@ private constructor(
2930
private val additionalQueryParams: QueryParams,
3031
) : Params {
3132

33+
fun assignedToMe(): Optional<Boolean> = Optional.ofNullable(assignedToMe)
34+
3235
fun datasetId(): Optional<String> = Optional.ofNullable(datasetId)
3336

3437
fun ids(): Optional<List<String>> = Optional.ofNullable(ids)
@@ -67,6 +70,7 @@ private constructor(
6770
/** A builder for [AnnotationQueueRetrieveAnnotationQueuesParams]. */
6871
class Builder internal constructor() {
6972

73+
private var assignedToMe: Boolean? = null
7074
private var datasetId: String? = null
7175
private var ids: MutableList<String>? = null
7276
private var limit: Long? = null
@@ -83,6 +87,7 @@ private constructor(
8387
annotationQueueRetrieveAnnotationQueuesParams:
8488
AnnotationQueueRetrieveAnnotationQueuesParams
8589
) = apply {
90+
assignedToMe = annotationQueueRetrieveAnnotationQueuesParams.assignedToMe
8691
datasetId = annotationQueueRetrieveAnnotationQueuesParams.datasetId
8792
ids = annotationQueueRetrieveAnnotationQueuesParams.ids?.toMutableList()
8893
limit = annotationQueueRetrieveAnnotationQueuesParams.limit
@@ -97,6 +102,18 @@ private constructor(
97102
annotationQueueRetrieveAnnotationQueuesParams.additionalQueryParams.toBuilder()
98103
}
99104

105+
fun assignedToMe(assignedToMe: Boolean?) = apply { this.assignedToMe = assignedToMe }
106+
107+
/**
108+
* Alias for [Builder.assignedToMe].
109+
*
110+
* This unboxed primitive overload exists for backwards compatibility.
111+
*/
112+
fun assignedToMe(assignedToMe: Boolean) = assignedToMe(assignedToMe as Boolean?)
113+
114+
/** Alias for calling [Builder.assignedToMe] with `assignedToMe.orElse(null)`. */
115+
fun assignedToMe(assignedToMe: Optional<Boolean>) = assignedToMe(assignedToMe.getOrNull())
116+
100117
fun datasetId(datasetId: String?) = apply { this.datasetId = datasetId }
101118

102119
/** Alias for calling [Builder.datasetId] with `datasetId.orElse(null)`. */
@@ -274,6 +291,7 @@ private constructor(
274291
*/
275292
fun build(): AnnotationQueueRetrieveAnnotationQueuesParams =
276293
AnnotationQueueRetrieveAnnotationQueuesParams(
294+
assignedToMe,
277295
datasetId,
278296
ids?.toImmutable(),
279297
limit,
@@ -292,6 +310,7 @@ private constructor(
292310
override fun _queryParams(): QueryParams =
293311
QueryParams.builder()
294312
.apply {
313+
assignedToMe?.let { put("assigned_to_me", it.toString()) }
295314
datasetId?.let { put("dataset_id", it) }
296315
ids?.let { put("ids", it.joinToString(",")) }
297316
limit?.let { put("limit", it.toString()) }
@@ -439,6 +458,7 @@ private constructor(
439458
}
440459

441460
return other is AnnotationQueueRetrieveAnnotationQueuesParams &&
461+
assignedToMe == other.assignedToMe &&
442462
datasetId == other.datasetId &&
443463
ids == other.ids &&
444464
limit == other.limit &&
@@ -453,6 +473,7 @@ private constructor(
453473

454474
override fun hashCode(): Int =
455475
Objects.hash(
476+
assignedToMe,
456477
datasetId,
457478
ids,
458479
limit,
@@ -466,5 +487,5 @@ private constructor(
466487
)
467488

468489
override fun toString() =
469-
"AnnotationQueueRetrieveAnnotationQueuesParams{datasetId=$datasetId, ids=$ids, limit=$limit, name=$name, nameContains=$nameContains, offset=$offset, queueType=$queueType, tagValueId=$tagValueId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
490+
"AnnotationQueueRetrieveAnnotationQueuesParams{assignedToMe=$assignedToMe, datasetId=$datasetId, ids=$ids, limit=$limit, name=$name, nameContains=$nameContains, offset=$offset, queueType=$queueType, tagValueId=$tagValueId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
470491
}

0 commit comments

Comments
 (0)