Build SDK

Stainless-Generated-From: fa9e9cd4cf1e6fa524a69184c0fbaba61eae1556
This commit is contained in:
Kiewan Villatel
2026-07-31 18:41:49 +02:00
parent c9f51683ce
commit 32192ca3e1
58 changed files with 1209 additions and 88 deletions
@@ -21,6 +21,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Create Identity Annotation Queue Run Status */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
class AnnotationQueueCreateRunStatusParams
private constructor(
private val annotationQueueRunId: String?,
@@ -11,6 +11,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Get a run from an annotation queue */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
class AnnotationQueueRetrieveRunParams
private constructor(
private val queueId: String,
@@ -14,6 +14,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Get Size From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
class AnnotationQueueRetrieveSizeParams
private constructor(
private val queueId: String?,
@@ -12,6 +12,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Get Total Archived From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
class AnnotationQueueRetrieveTotalArchivedParams
private constructor(
private val queueId: String?,
@@ -10,6 +10,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Get Total Size From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
class AnnotationQueueRetrieveTotalSizeParams
private constructor(
private val queueId: String?,
@@ -22,7 +22,10 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Add Runs To Annotation Queue By Key */
/** Self-hosted deployments require LangSmith `v0.16` or later. */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
class RunCreateByKeyParams
private constructor(
private val queueId: String?,
@@ -35,6 +35,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Add Runs To Annotation Queue */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
class RunCreateParams
private constructor(
private val queueId: String?,
@@ -22,6 +22,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Delete Runs From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
class RunDeleteAllParams
private constructor(
private val queueId: String?,
@@ -13,6 +13,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Delete Run From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
class RunDeleteQueueParams
private constructor(
private val queueId: String,
@@ -14,6 +14,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Get Runs From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
class RunListParams
private constructor(
private val queueId: String?,
@@ -22,6 +22,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Update Run In Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
class RunUpdateParams
private constructor(
private val queueId: String,
@@ -25,6 +25,8 @@ import kotlin.jvm.optionals.getOrNull
/**
* Returns a paginated page of dataset examples with runs from the requested experiments. Response
* uses the canonical `{items, next_cursor}` envelope.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class ExperimentRunQueryParams
private constructor(
@@ -27,6 +27,9 @@ import kotlin.jvm.optionals.getOrNull
* Fetch examples for a dataset, and fetch the runs for each example if they are associated with the
* given session_ids.
*/
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
class RunQueryParams
private constructor(
private val datasetId: String?,
@@ -618,6 +618,10 @@ private constructor(
@JvmField val OPEN = of("open")
@JvmField val FIXING = of("fixing")
@JvmField val WATCHING = of("watching")
@JvmField val COMPLETED = of("completed")
@JvmField val IGNORED = of("ignored")
@@ -628,6 +632,8 @@ private constructor(
/** An enum containing [Status]'s known values. */
enum class Known {
OPEN,
FIXING,
WATCHING,
COMPLETED,
IGNORED,
}
@@ -643,6 +649,8 @@ private constructor(
*/
enum class Value {
OPEN,
FIXING,
WATCHING,
COMPLETED,
IGNORED,
/** An enum member indicating that [Status] was instantiated with an unknown value. */
@@ -659,6 +667,8 @@ private constructor(
fun value(): Value =
when (this) {
OPEN -> Value.OPEN
FIXING -> Value.FIXING
WATCHING -> Value.WATCHING
COMPLETED -> Value.COMPLETED
IGNORED -> Value.IGNORED
else -> Value._UNKNOWN
@@ -676,6 +686,8 @@ private constructor(
fun known(): Known =
when (this) {
OPEN -> Known.OPEN
FIXING -> Known.FIXING
WATCHING -> Known.WATCHING
COMPLETED -> Known.COMPLETED
IGNORED -> Known.IGNORED
else -> throw LangChainInvalidDataException("Unknown Status: $value")
@@ -23,8 +23,10 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
* **Alpha:** The request and response contract may change; Returns all runs within the trace
* identified by the share token. The share token supplies the tenant, project, and trace scope.
* Returns all runs within the trace identified by the share token. The share token supplies the
* tenant, project, and trace scope.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class RunQueryParams
private constructor(
@@ -14,9 +14,10 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
* **Alpha:** The request and response contract may change; Returns one run within the trace
* identified by the share token. The request supplies only the run ID and that run's exact
* start_time coordinate.
* Returns one run within the trace identified by the share token. The request supplies only the run
* ID and that run's exact start_time coordinate.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class RunRetrieveParams
private constructor(
@@ -13,6 +13,8 @@ import kotlin.jvm.optionals.getOrNull
/**
* Returns the URL to view a specific run in the LangSmith UI. The caller must supply the run's
* project_id and trace_id as query parameters; start_time is optional.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class RunGetUrlParams
private constructor(
@@ -11,6 +11,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** @see RunService.queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
class RunQueryV1Page
private constructor(
private val service: RunService,
@@ -13,6 +13,9 @@ import java.util.concurrent.Executor
import kotlin.jvm.optionals.getOrNull
/** @see RunServiceAsync.queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
class RunQueryV1PageAsync
private constructor(
private val service: RunServiceAsync,
@@ -24,6 +24,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Query Runs */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
class RunQueryV1Params
private constructor(
private val body: Body,
@@ -23,9 +23,10 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
* **Alpha:** The request and response contract may change; Returns a paginated list of runs for the
* given projects within min/max start_time. Supports filters, cursor pagination, and `selects` to
* select fields to return.
* Returns a paginated list of runs for the given projects within min/max start_time. Supports
* filters, cursor pagination, and `selects` to select fields to return.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class RunQueryV2Params
private constructor(
@@ -12,6 +12,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Get a specific run. */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
class RunRetrieveV1Params
private constructor(
private val runId: String?,
@@ -18,8 +18,10 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
* **Alpha:** The request and response contract may change; Returns one run by ID for the given
* session. Use the `selects` query parameter (repeatable) to select fields to return.
* Returns one run by ID for the given session. Use the `selects` query parameter (repeatable) to
* select fields to return.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class RunRetrieveV2Params
private constructor(
@@ -19,7 +19,11 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/** Creates or returns a share token for a run. Child runs share their trace root. */
/**
* Creates or returns a share token for a run. Child runs share their trace root.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class ShareCreateParams
private constructor(
private val runId: String?,
@@ -22,6 +22,8 @@ import kotlin.jvm.optionals.getOrNull
/**
* Deletes the share token for the trace identified by trace_id and session_id. Idempotent: returns
* 204 whether or not a share token existed.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class ShareDeleteParams
private constructor(
@@ -16,8 +16,9 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
* **Alpha:** The request and response contract may change; Retrieve all traces belonging to a
* specific thread within a project.
* Retrieve all traces belonging to a specific thread within a project.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class ThreadListTracesParams
private constructor(
@@ -20,9 +20,10 @@ import java.util.Objects
import java.util.Optional
/**
* **Alpha:** The request and response contract may change; Query threads within a project
* (session), with cursor-based pagination. Returns threads matching the given time range and
* optional filter.
* Query threads within a project (session), with cursor-based pagination. Returns threads matching
* the given time range and optional filter.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class ThreadQueryParams
private constructor(
@@ -16,9 +16,10 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
* **Alpha:** The request and response contract may change; Compute aggregate stats for a single
* thread (turn count, latency percentiles, token/cost sums, and detail breakdowns) within a
* project.
* Compute aggregate stats for a single thread (turn count, latency percentiles, token/cost sums,
* and detail breakdowns) within a project.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class ThreadStatsParams
private constructor(
@@ -18,8 +18,10 @@ import java.util.Optional
import kotlin.jvm.optionals.getOrNull
/**
* **Alpha:** The request and response contract may change; Returns runs for a trace ID within
* min/max start time. Optional `filter`; repeatable `selects` to select fields to return.
* Returns runs for a trace ID within min/max start time. Optional `filter`; repeatable `selects` to
* select fields to return.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class TraceListRunsParams
private constructor(
@@ -34,6 +34,8 @@ import kotlin.jvm.optionals.getOrNull
*
* Supports filters (`trace_filter`, `tree_filter`), cursor pagination (`cursor`), and field
* projection (`selects`).
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
class TraceQueryParams
private constructor(
@@ -174,12 +174,18 @@ interface AnnotationQueueServiceAsync {
): CompletableFuture<AnnotationQueueSchema>
/** Create Identity Annotation Queue Run Status */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String
): CompletableFuture<AnnotationQueueCreateRunStatusResponse> =
createRunStatus(annotationQueueRunId, AnnotationQueueCreateRunStatusParams.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String,
params: AnnotationQueueCreateRunStatusParams = AnnotationQueueCreateRunStatusParams.none(),
@@ -191,6 +197,9 @@ interface AnnotationQueueServiceAsync {
)
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String,
params: AnnotationQueueCreateRunStatusParams = AnnotationQueueCreateRunStatusParams.none(),
@@ -198,18 +207,27 @@ interface AnnotationQueueServiceAsync {
createRunStatus(annotationQueueRunId, params, RequestOptions.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<AnnotationQueueCreateRunStatusResponse>
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams
): CompletableFuture<AnnotationQueueCreateRunStatusResponse> =
createRunStatus(params, RequestOptions.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String,
requestOptions: RequestOptions,
@@ -335,6 +353,9 @@ interface AnnotationQueueServiceAsync {
retrieveQueues(runId, AnnotationQueueRetrieveQueuesParams.none(), requestOptions)
/** Get a run from an annotation queue */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
index: Long,
params: AnnotationQueueRetrieveRunParams,
@@ -342,6 +363,9 @@ interface AnnotationQueueServiceAsync {
retrieveRun(index, params, RequestOptions.none())
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
index: Long,
params: AnnotationQueueRetrieveRunParams,
@@ -350,22 +374,34 @@ interface AnnotationQueueServiceAsync {
retrieveRun(params.toBuilder().index(index).build(), requestOptions)
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
params: AnnotationQueueRetrieveRunParams
): CompletableFuture<RunSchemaWithAnnotationQueueInfo> =
retrieveRun(params, RequestOptions.none())
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
params: AnnotationQueueRetrieveRunParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<RunSchemaWithAnnotationQueueInfo>
/** Get Size From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(queueId: String): CompletableFuture<AnnotationQueueSizeSchema> =
retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
queueId: String,
params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(),
@@ -374,6 +410,9 @@ interface AnnotationQueueServiceAsync {
retrieveSize(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
queueId: String,
params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(),
@@ -381,17 +420,26 @@ interface AnnotationQueueServiceAsync {
retrieveSize(queueId, params, RequestOptions.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<AnnotationQueueSizeSchema>
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams
): CompletableFuture<AnnotationQueueSizeSchema> = retrieveSize(params, RequestOptions.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
queueId: String,
requestOptions: RequestOptions,
@@ -399,10 +447,16 @@ interface AnnotationQueueServiceAsync {
retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none(), requestOptions)
/** Get Total Archived From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(queueId: String): CompletableFuture<AnnotationQueueSizeSchema> =
retrieveTotalArchived(queueId, AnnotationQueueRetrieveTotalArchivedParams.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
queueId: String,
params: AnnotationQueueRetrieveTotalArchivedParams =
@@ -412,6 +466,9 @@ interface AnnotationQueueServiceAsync {
retrieveTotalArchived(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
queueId: String,
params: AnnotationQueueRetrieveTotalArchivedParams =
@@ -420,18 +477,27 @@ interface AnnotationQueueServiceAsync {
retrieveTotalArchived(queueId, params, RequestOptions.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<AnnotationQueueSizeSchema>
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams
): CompletableFuture<AnnotationQueueSizeSchema> =
retrieveTotalArchived(params, RequestOptions.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
queueId: String,
requestOptions: RequestOptions,
@@ -443,10 +509,16 @@ interface AnnotationQueueServiceAsync {
)
/** Get Total Size From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(queueId: String): CompletableFuture<AnnotationQueueSizeSchema> =
retrieveTotalSize(queueId, AnnotationQueueRetrieveTotalSizeParams.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
queueId: String,
params: AnnotationQueueRetrieveTotalSizeParams =
@@ -456,6 +528,9 @@ interface AnnotationQueueServiceAsync {
retrieveTotalSize(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
queueId: String,
params: AnnotationQueueRetrieveTotalSizeParams =
@@ -464,18 +539,27 @@ interface AnnotationQueueServiceAsync {
retrieveTotalSize(queueId, params, RequestOptions.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<AnnotationQueueSizeSchema>
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams
): CompletableFuture<AnnotationQueueSizeSchema> =
retrieveTotalSize(params, RequestOptions.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
queueId: String,
requestOptions: RequestOptions,
@@ -650,12 +734,18 @@ interface AnnotationQueueServiceAsync {
* /api/v1/annotation-queues/status/{annotation_queue_run_id}`, but is otherwise the same as
* [AnnotationQueueServiceAsync.createRunStatus].
*/
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String
): CompletableFuture<HttpResponseFor<AnnotationQueueCreateRunStatusResponse>> =
createRunStatus(annotationQueueRunId, AnnotationQueueCreateRunStatusParams.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String,
params: AnnotationQueueCreateRunStatusParams =
@@ -668,6 +758,9 @@ interface AnnotationQueueServiceAsync {
)
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String,
params: AnnotationQueueCreateRunStatusParams =
@@ -676,18 +769,27 @@ interface AnnotationQueueServiceAsync {
createRunStatus(annotationQueueRunId, params, RequestOptions.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<HttpResponseFor<AnnotationQueueCreateRunStatusResponse>>
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams
): CompletableFuture<HttpResponseFor<AnnotationQueueCreateRunStatusResponse>> =
createRunStatus(params, RequestOptions.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String,
requestOptions: RequestOptions,
@@ -835,6 +937,9 @@ interface AnnotationQueueServiceAsync {
* Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/run/{index}`,
* but is otherwise the same as [AnnotationQueueServiceAsync.retrieveRun].
*/
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
index: Long,
params: AnnotationQueueRetrieveRunParams,
@@ -842,6 +947,9 @@ interface AnnotationQueueServiceAsync {
retrieveRun(index, params, RequestOptions.none())
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
index: Long,
params: AnnotationQueueRetrieveRunParams,
@@ -850,12 +958,18 @@ interface AnnotationQueueServiceAsync {
retrieveRun(params.toBuilder().index(index).build(), requestOptions)
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
params: AnnotationQueueRetrieveRunParams
): CompletableFuture<HttpResponseFor<RunSchemaWithAnnotationQueueInfo>> =
retrieveRun(params, RequestOptions.none())
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
params: AnnotationQueueRetrieveRunParams,
requestOptions: RequestOptions = RequestOptions.none(),
@@ -865,12 +979,18 @@ interface AnnotationQueueServiceAsync {
* Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/size`, but is
* otherwise the same as [AnnotationQueueServiceAsync.retrieveSize].
*/
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
queueId: String
): CompletableFuture<HttpResponseFor<AnnotationQueueSizeSchema>> =
retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
queueId: String,
params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(),
@@ -879,6 +999,9 @@ interface AnnotationQueueServiceAsync {
retrieveSize(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
queueId: String,
params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(),
@@ -886,18 +1009,27 @@ interface AnnotationQueueServiceAsync {
retrieveSize(queueId, params, RequestOptions.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<HttpResponseFor<AnnotationQueueSizeSchema>>
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams
): CompletableFuture<HttpResponseFor<AnnotationQueueSizeSchema>> =
retrieveSize(params, RequestOptions.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
queueId: String,
requestOptions: RequestOptions,
@@ -909,12 +1041,18 @@ interface AnnotationQueueServiceAsync {
* /api/v1/annotation-queues/{queue_id}/total_archived`, but is otherwise the same as
* [AnnotationQueueServiceAsync.retrieveTotalArchived].
*/
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
queueId: String
): CompletableFuture<HttpResponseFor<AnnotationQueueSizeSchema>> =
retrieveTotalArchived(queueId, AnnotationQueueRetrieveTotalArchivedParams.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
queueId: String,
params: AnnotationQueueRetrieveTotalArchivedParams =
@@ -924,6 +1062,9 @@ interface AnnotationQueueServiceAsync {
retrieveTotalArchived(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
queueId: String,
params: AnnotationQueueRetrieveTotalArchivedParams =
@@ -932,18 +1073,27 @@ interface AnnotationQueueServiceAsync {
retrieveTotalArchived(queueId, params, RequestOptions.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<HttpResponseFor<AnnotationQueueSizeSchema>>
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams
): CompletableFuture<HttpResponseFor<AnnotationQueueSizeSchema>> =
retrieveTotalArchived(params, RequestOptions.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
queueId: String,
requestOptions: RequestOptions,
@@ -958,12 +1108,18 @@ interface AnnotationQueueServiceAsync {
* Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/total_size`,
* but is otherwise the same as [AnnotationQueueServiceAsync.retrieveTotalSize].
*/
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
queueId: String
): CompletableFuture<HttpResponseFor<AnnotationQueueSizeSchema>> =
retrieveTotalSize(queueId, AnnotationQueueRetrieveTotalSizeParams.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
queueId: String,
params: AnnotationQueueRetrieveTotalSizeParams =
@@ -973,6 +1129,9 @@ interface AnnotationQueueServiceAsync {
retrieveTotalSize(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
queueId: String,
params: AnnotationQueueRetrieveTotalSizeParams =
@@ -981,18 +1140,27 @@ interface AnnotationQueueServiceAsync {
retrieveTotalSize(queueId, params, RequestOptions.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<HttpResponseFor<AnnotationQueueSizeSchema>>
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams
): CompletableFuture<HttpResponseFor<AnnotationQueueSizeSchema>> =
retrieveTotalSize(params, RequestOptions.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
queueId: String,
requestOptions: RequestOptions,
@@ -98,6 +98,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue
// post /api/v1/annotation-queues
withRawResponse().annotationQueues(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
override fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams,
requestOptions: RequestOptions,
@@ -133,6 +136,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue
// get /api/v1/annotation-queues/{run_id}/queues
withRawResponse().retrieveQueues(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
override fun retrieveRun(
params: AnnotationQueueRetrieveRunParams,
requestOptions: RequestOptions,
@@ -140,6 +146,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue
// get /api/v1/annotation-queues/{queue_id}/run/{index}
withRawResponse().retrieveRun(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
override fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams,
requestOptions: RequestOptions,
@@ -147,6 +156,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue
// get /api/v1/annotation-queues/{queue_id}/size
withRawResponse().retrieveSize(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
override fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams,
requestOptions: RequestOptions,
@@ -154,6 +166,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue
// get /api/v1/annotation-queues/{queue_id}/total_archived
withRawResponse().retrieveTotalArchived(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
override fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams,
requestOptions: RequestOptions,
@@ -321,6 +336,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue
private val createRunStatusHandler: Handler<AnnotationQueueCreateRunStatusResponse> =
jsonHandler<AnnotationQueueCreateRunStatusResponse>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
override fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams,
requestOptions: RequestOptions,
@@ -512,6 +530,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue
private val retrieveRunHandler: Handler<RunSchemaWithAnnotationQueueInfo> =
jsonHandler<RunSchemaWithAnnotationQueueInfo>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
override fun retrieveRun(
params: AnnotationQueueRetrieveRunParams,
requestOptions: RequestOptions,
@@ -552,6 +573,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue
private val retrieveSizeHandler: Handler<AnnotationQueueSizeSchema> =
jsonHandler<AnnotationQueueSizeSchema>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
override fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams,
requestOptions: RequestOptions,
@@ -585,6 +609,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue
private val retrieveTotalArchivedHandler: Handler<AnnotationQueueSizeSchema> =
jsonHandler<AnnotationQueueSizeSchema>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
override fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams,
requestOptions: RequestOptions,
@@ -624,6 +651,9 @@ internal constructor(private val clientOptions: ClientOptions) : AnnotationQueue
private val retrieveTotalSizeHandler: Handler<AnnotationQueueSizeSchema> =
jsonHandler<AnnotationQueueSizeSchema>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
override fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams,
requestOptions: RequestOptions,
@@ -107,6 +107,8 @@ interface RunServiceAsync {
/**
* Returns the URL to view a specific run in the LangSmith UI. The caller must supply the run's
* project_id and trace_id as query parameters; start_time is optional.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun getUrl(runId: String, params: RunGetUrlParams): CompletableFuture<RunGetUrlResponse> =
getUrl(runId, params, RequestOptions.none())
@@ -189,27 +191,40 @@ interface RunServiceAsync {
)
/** Query Runs */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(): CompletableFuture<RunQueryV1PageAsync> = queryV1(RunQueryV1Params.none())
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(
params: RunQueryV1Params = RunQueryV1Params.none(),
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<RunQueryV1PageAsync>
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(
params: RunQueryV1Params = RunQueryV1Params.none()
): CompletableFuture<RunQueryV1PageAsync> = queryV1(params, RequestOptions.none())
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(requestOptions: RequestOptions): CompletableFuture<RunQueryV1PageAsync> =
queryV1(RunQueryV1Params.none(), requestOptions)
/**
* **Alpha:** The request and response contract may change; Returns a paginated list of runs for
* the given projects within min/max start_time. Supports filters, cursor pagination, and
* `selects` to select fields to return.
* Returns a paginated list of runs for the given projects within min/max start_time. Supports
* filters, cursor pagination, and `selects` to select fields to return.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun queryV2(): CompletableFuture<RunQueryV2PageAsync> = queryV2(RunQueryV2Params.none())
@@ -229,10 +244,16 @@ interface RunServiceAsync {
queryV2(RunQueryV2Params.none(), requestOptions)
/** Get a specific run. */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(runId: String): CompletableFuture<RunSchema> =
retrieveV1(runId, RunRetrieveV1Params.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(
runId: String,
params: RunRetrieveV1Params = RunRetrieveV1Params.none(),
@@ -241,28 +262,42 @@ interface RunServiceAsync {
retrieveV1(params.toBuilder().runId(runId).build(), requestOptions)
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(
runId: String,
params: RunRetrieveV1Params = RunRetrieveV1Params.none(),
): CompletableFuture<RunSchema> = retrieveV1(runId, params, RequestOptions.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(
params: RunRetrieveV1Params,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<RunSchema>
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(params: RunRetrieveV1Params): CompletableFuture<RunSchema> =
retrieveV1(params, RequestOptions.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(runId: String, requestOptions: RequestOptions): CompletableFuture<RunSchema> =
retrieveV1(runId, RunRetrieveV1Params.none(), requestOptions)
/**
* **Alpha:** The request and response contract may change; Returns one run by ID for the given
* session. Use the `selects` query parameter (repeatable) to select fields to return.
* Returns one run by ID for the given session. Use the `selects` query parameter (repeatable)
* to select fields to return.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun retrieveV2(runId: String, params: RunRetrieveV2Params): CompletableFuture<Run> =
retrieveV2(runId, params, RequestOptions.none())
@@ -542,22 +577,34 @@ interface RunServiceAsync {
* Returns a raw HTTP response for `post /api/v1/runs/query`, but is otherwise the same as
* [RunServiceAsync.queryV1].
*/
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(): CompletableFuture<HttpResponseFor<RunQueryV1PageAsync>> =
queryV1(RunQueryV1Params.none())
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(
params: RunQueryV1Params = RunQueryV1Params.none(),
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<HttpResponseFor<RunQueryV1PageAsync>>
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(
params: RunQueryV1Params = RunQueryV1Params.none()
): CompletableFuture<HttpResponseFor<RunQueryV1PageAsync>> =
queryV1(params, RequestOptions.none())
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(
requestOptions: RequestOptions
): CompletableFuture<HttpResponseFor<RunQueryV1PageAsync>> =
@@ -592,10 +639,16 @@ interface RunServiceAsync {
* Returns a raw HTTP response for `get /api/v1/runs/{run_id}`, but is otherwise the same as
* [RunServiceAsync.retrieveV1].
*/
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(runId: String): CompletableFuture<HttpResponseFor<RunSchema>> =
retrieveV1(runId, RunRetrieveV1Params.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(
runId: String,
params: RunRetrieveV1Params = RunRetrieveV1Params.none(),
@@ -604,6 +657,9 @@ interface RunServiceAsync {
retrieveV1(params.toBuilder().runId(runId).build(), requestOptions)
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(
runId: String,
params: RunRetrieveV1Params = RunRetrieveV1Params.none(),
@@ -611,16 +667,25 @@ interface RunServiceAsync {
retrieveV1(runId, params, RequestOptions.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(
params: RunRetrieveV1Params,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<HttpResponseFor<RunSchema>>
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(params: RunRetrieveV1Params): CompletableFuture<HttpResponseFor<RunSchema>> =
retrieveV1(params, RequestOptions.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(
runId: String,
requestOptions: RequestOptions,
@@ -233,6 +233,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
): CompletableFuture<Void?> =
withRawResponse().multipartIngest(create, update, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
override fun queryV1(
params: RunQueryV1Params,
requestOptions: RequestOptions,
@@ -247,6 +250,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
// post /api/v2/runs/query
withRawResponse().queryV2(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
override fun retrieveV1(
params: RunRetrieveV1Params,
requestOptions: RequestOptions,
@@ -561,6 +567,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
private val queryV1Handler: Handler<RunQueryV1PageResponse> =
jsonHandler<RunQueryV1PageResponse>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
override fun queryV1(
params: RunQueryV1Params,
requestOptions: RequestOptions,
@@ -639,6 +648,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
private val retrieveV1Handler: Handler<RunSchema> =
jsonHandler<RunSchema>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
override fun retrieveV1(
params: RunRetrieveV1Params,
requestOptions: RequestOptions,
@@ -29,8 +29,9 @@ interface ThreadServiceAsync {
fun withOptions(modifier: Consumer<ClientOptions.Builder>): ThreadServiceAsync
/**
* **Alpha:** The request and response contract may change; Retrieve all traces belonging to a
* specific thread within a project.
* Retrieve all traces belonging to a specific thread within a project.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun listTraces(
threadId: String,
@@ -57,9 +58,10 @@ interface ThreadServiceAsync {
): CompletableFuture<ThreadListTracesPageAsync>
/**
* **Alpha:** The request and response contract may change; Query threads within a project
* (session), with cursor-based pagination. Returns threads matching the given time range and
* optional filter.
* Query threads within a project (session), with cursor-based pagination. Returns threads
* matching the given time range and optional filter.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun query(): CompletableFuture<ThreadQueryPageAsync> = query(ThreadQueryParams.none())
@@ -79,9 +81,10 @@ interface ThreadServiceAsync {
query(ThreadQueryParams.none(), requestOptions)
/**
* **Alpha:** The request and response contract may change; Compute aggregate stats for a single
* thread (turn count, latency percentiles, token/cost sums, and detail breakdowns) within a
* project.
* Compute aggregate stats for a single thread (turn count, latency percentiles, token/cost
* sums, and detail breakdowns) within a project.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun stats(threadId: String, params: ThreadStatsParams): CompletableFuture<ThreadStats> =
stats(threadId, params, RequestOptions.none())
@@ -27,8 +27,10 @@ interface TraceServiceAsync {
fun withOptions(modifier: Consumer<ClientOptions.Builder>): TraceServiceAsync
/**
* **Alpha:** The request and response contract may change; Returns runs for a trace ID within
* min/max start time. Optional `filter`; repeatable `selects` to select fields to return.
* Returns runs for a trace ID within min/max start time. Optional `filter`; repeatable
* `selects` to select fields to return.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun listRuns(
traceId: String,
@@ -65,6 +67,8 @@ interface TraceServiceAsync {
*
* Supports filters (`trace_filter`, `tree_filter`), cursor pagination (`cursor`), and field
* projection (`selects`).
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun query(): CompletableFuture<TraceQueryPageAsync> = query(TraceQueryParams.none())
@@ -35,12 +35,18 @@ interface RunServiceAsync {
fun withOptions(modifier: Consumer<ClientOptions.Builder>): RunServiceAsync
/** Add Runs To Annotation Queue */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(
queueId: String,
params: RunCreateParams,
): CompletableFuture<List<RunCreateResponse>> = create(queueId, params, RequestOptions.none())
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(
queueId: String,
params: RunCreateParams,
@@ -49,20 +55,32 @@ interface RunServiceAsync {
create(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(params: RunCreateParams): CompletableFuture<List<RunCreateResponse>> =
create(params, RequestOptions.none())
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(
params: RunCreateParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<List<RunCreateResponse>>
/** Update Run In Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(queueRunId: String, params: RunUpdateParams): CompletableFuture<RunUpdateResponse> =
update(queueRunId, params, RequestOptions.none())
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(
queueRunId: String,
params: RunUpdateParams,
@@ -71,20 +89,32 @@ interface RunServiceAsync {
update(params.toBuilder().queueRunId(queueRunId).build(), requestOptions)
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(params: RunUpdateParams): CompletableFuture<RunUpdateResponse> =
update(params, RequestOptions.none())
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(
params: RunUpdateParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<RunUpdateResponse>
/** Get Runs From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(queueId: String): CompletableFuture<List<RunSchemaWithAnnotationQueueInfo>> =
list(queueId, RunListParams.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
queueId: String,
params: RunListParams = RunListParams.none(),
@@ -93,6 +123,9 @@ interface RunServiceAsync {
list(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
queueId: String,
params: RunListParams = RunListParams.none(),
@@ -100,23 +133,35 @@ interface RunServiceAsync {
list(queueId, params, RequestOptions.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
params: RunListParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<List<RunSchemaWithAnnotationQueueInfo>>
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(params: RunListParams): CompletableFuture<List<RunSchemaWithAnnotationQueueInfo>> =
list(params, RequestOptions.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
queueId: String,
requestOptions: RequestOptions,
): CompletableFuture<List<RunSchemaWithAnnotationQueueInfo>> =
list(queueId, RunListParams.none(), requestOptions)
/** Add Runs To Annotation Queue By Key */
/** Self-hosted deployments require LangSmith `v0.16` or later. */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(
queueId: String,
params: RunCreateByKeyParams,
@@ -124,6 +169,9 @@ interface RunServiceAsync {
createByKey(queueId, params, RequestOptions.none())
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(
queueId: String,
params: RunCreateByKeyParams,
@@ -132,20 +180,32 @@ interface RunServiceAsync {
createByKey(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(params: RunCreateByKeyParams): CompletableFuture<List<RunCreateByKeyResponse>> =
createByKey(params, RequestOptions.none())
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(
params: RunCreateByKeyParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<List<RunCreateByKeyResponse>>
/** Delete Runs From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(queueId: String): CompletableFuture<RunDeleteAllResponse> =
deleteAll(queueId, RunDeleteAllParams.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
queueId: String,
params: RunDeleteAllParams = RunDeleteAllParams.none(),
@@ -154,22 +214,34 @@ interface RunServiceAsync {
deleteAll(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
queueId: String,
params: RunDeleteAllParams = RunDeleteAllParams.none(),
): CompletableFuture<RunDeleteAllResponse> = deleteAll(queueId, params, RequestOptions.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
params: RunDeleteAllParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<RunDeleteAllResponse>
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(params: RunDeleteAllParams): CompletableFuture<RunDeleteAllResponse> =
deleteAll(params, RequestOptions.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
queueId: String,
requestOptions: RequestOptions,
@@ -177,6 +249,9 @@ interface RunServiceAsync {
deleteAll(queueId, RunDeleteAllParams.none(), requestOptions)
/** Delete Run From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(
queueRunId: String,
params: RunDeleteQueueParams,
@@ -184,6 +259,9 @@ interface RunServiceAsync {
deleteQueue(queueRunId, params, RequestOptions.none())
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(
queueRunId: String,
params: RunDeleteQueueParams,
@@ -192,10 +270,16 @@ interface RunServiceAsync {
deleteQueue(params.toBuilder().queueRunId(queueRunId).build(), requestOptions)
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(params: RunDeleteQueueParams): CompletableFuture<RunDeleteQueueResponse> =
deleteQueue(params, RequestOptions.none())
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(
params: RunDeleteQueueParams,
requestOptions: RequestOptions = RequestOptions.none(),
@@ -215,6 +299,9 @@ interface RunServiceAsync {
* Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs`, but is
* otherwise the same as [RunServiceAsync.create].
*/
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(
queueId: String,
params: RunCreateParams,
@@ -222,6 +309,9 @@ interface RunServiceAsync {
create(queueId, params, RequestOptions.none())
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(
queueId: String,
params: RunCreateParams,
@@ -230,12 +320,18 @@ interface RunServiceAsync {
create(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(
params: RunCreateParams
): CompletableFuture<HttpResponseFor<List<RunCreateResponse>>> =
create(params, RequestOptions.none())
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(
params: RunCreateParams,
requestOptions: RequestOptions = RequestOptions.none(),
@@ -246,6 +342,9 @@ interface RunServiceAsync {
* /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id}`, but is otherwise the same as
* [RunServiceAsync.update].
*/
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(
queueRunId: String,
params: RunUpdateParams,
@@ -253,6 +352,9 @@ interface RunServiceAsync {
update(queueRunId, params, RequestOptions.none())
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(
queueRunId: String,
params: RunUpdateParams,
@@ -261,10 +363,16 @@ interface RunServiceAsync {
update(params.toBuilder().queueRunId(queueRunId).build(), requestOptions)
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(params: RunUpdateParams): CompletableFuture<HttpResponseFor<RunUpdateResponse>> =
update(params, RequestOptions.none())
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(
params: RunUpdateParams,
requestOptions: RequestOptions = RequestOptions.none(),
@@ -274,12 +382,18 @@ interface RunServiceAsync {
* Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/runs`, but is
* otherwise the same as [RunServiceAsync.list].
*/
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
queueId: String
): CompletableFuture<HttpResponseFor<List<RunSchemaWithAnnotationQueueInfo>>> =
list(queueId, RunListParams.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
queueId: String,
params: RunListParams = RunListParams.none(),
@@ -288,6 +402,9 @@ interface RunServiceAsync {
list(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
queueId: String,
params: RunListParams = RunListParams.none(),
@@ -295,18 +412,27 @@ interface RunServiceAsync {
list(queueId, params, RequestOptions.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
params: RunListParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<HttpResponseFor<List<RunSchemaWithAnnotationQueueInfo>>>
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
params: RunListParams
): CompletableFuture<HttpResponseFor<List<RunSchemaWithAnnotationQueueInfo>>> =
list(params, RequestOptions.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
queueId: String,
requestOptions: RequestOptions,
@@ -317,6 +443,9 @@ interface RunServiceAsync {
* Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs/by-key`,
* but is otherwise the same as [RunServiceAsync.createByKey].
*/
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(
queueId: String,
params: RunCreateByKeyParams,
@@ -324,6 +453,9 @@ interface RunServiceAsync {
createByKey(queueId, params, RequestOptions.none())
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(
queueId: String,
params: RunCreateByKeyParams,
@@ -332,12 +464,18 @@ interface RunServiceAsync {
createByKey(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(
params: RunCreateByKeyParams
): CompletableFuture<HttpResponseFor<List<RunCreateByKeyResponse>>> =
createByKey(params, RequestOptions.none())
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(
params: RunCreateByKeyParams,
requestOptions: RequestOptions = RequestOptions.none(),
@@ -347,10 +485,16 @@ interface RunServiceAsync {
* Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs/delete`,
* but is otherwise the same as [RunServiceAsync.deleteAll].
*/
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(queueId: String): CompletableFuture<HttpResponseFor<RunDeleteAllResponse>> =
deleteAll(queueId, RunDeleteAllParams.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
queueId: String,
params: RunDeleteAllParams = RunDeleteAllParams.none(),
@@ -359,6 +503,9 @@ interface RunServiceAsync {
deleteAll(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
queueId: String,
params: RunDeleteAllParams = RunDeleteAllParams.none(),
@@ -366,18 +513,27 @@ interface RunServiceAsync {
deleteAll(queueId, params, RequestOptions.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
params: RunDeleteAllParams,
requestOptions: RequestOptions = RequestOptions.none(),
): CompletableFuture<HttpResponseFor<RunDeleteAllResponse>>
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
params: RunDeleteAllParams
): CompletableFuture<HttpResponseFor<RunDeleteAllResponse>> =
deleteAll(params, RequestOptions.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
queueId: String,
requestOptions: RequestOptions,
@@ -389,6 +545,9 @@ interface RunServiceAsync {
* /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id}`, but is otherwise the same as
* [RunServiceAsync.deleteQueue].
*/
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(
queueRunId: String,
params: RunDeleteQueueParams,
@@ -396,6 +555,9 @@ interface RunServiceAsync {
deleteQueue(queueRunId, params, RequestOptions.none())
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(
queueRunId: String,
params: RunDeleteQueueParams,
@@ -404,12 +566,18 @@ interface RunServiceAsync {
deleteQueue(params.toBuilder().queueRunId(queueRunId).build(), requestOptions)
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(
params: RunDeleteQueueParams
): CompletableFuture<HttpResponseFor<RunDeleteQueueResponse>> =
deleteQueue(params, RequestOptions.none())
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(
params: RunDeleteQueueParams,
requestOptions: RequestOptions = RequestOptions.none(),
@@ -44,6 +44,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
override fun withOptions(modifier: Consumer<ClientOptions.Builder>): RunServiceAsync =
RunServiceAsyncImpl(clientOptions.toBuilder().apply(modifier::accept).build())
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
override fun create(
params: RunCreateParams,
requestOptions: RequestOptions,
@@ -51,6 +54,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
// post /api/v1/annotation-queues/{queue_id}/runs
withRawResponse().create(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
override fun update(
params: RunUpdateParams,
requestOptions: RequestOptions,
@@ -58,6 +64,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
// patch /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id}
withRawResponse().update(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
override fun list(
params: RunListParams,
requestOptions: RequestOptions,
@@ -65,6 +74,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
// get /api/v1/annotation-queues/{queue_id}/runs
withRawResponse().list(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
override fun createByKey(
params: RunCreateByKeyParams,
requestOptions: RequestOptions,
@@ -72,6 +84,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
// post /api/v1/annotation-queues/{queue_id}/runs/by-key
withRawResponse().createByKey(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
override fun deleteAll(
params: RunDeleteAllParams,
requestOptions: RequestOptions,
@@ -79,6 +94,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
// post /api/v1/annotation-queues/{queue_id}/runs/delete
withRawResponse().deleteAll(params, requestOptions).thenApply { it.parse() }
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
override fun deleteQueue(
params: RunDeleteQueueParams,
requestOptions: RequestOptions,
@@ -102,6 +120,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
private val createHandler: Handler<List<RunCreateResponse>> =
jsonHandler<List<RunCreateResponse>>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
override fun create(
params: RunCreateParams,
requestOptions: RequestOptions,
@@ -136,6 +157,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
private val updateHandler: Handler<RunUpdateResponse> =
jsonHandler<RunUpdateResponse>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
override fun update(
params: RunUpdateParams,
requestOptions: RequestOptions,
@@ -177,6 +201,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
private val listHandler: Handler<List<RunSchemaWithAnnotationQueueInfo>> =
jsonHandler<List<RunSchemaWithAnnotationQueueInfo>>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
override fun list(
params: RunListParams,
requestOptions: RequestOptions,
@@ -210,6 +237,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
private val createByKeyHandler: Handler<List<RunCreateByKeyResponse>> =
jsonHandler<List<RunCreateByKeyResponse>>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
override fun createByKey(
params: RunCreateByKeyParams,
requestOptions: RequestOptions,
@@ -251,6 +281,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
private val deleteAllHandler: Handler<RunDeleteAllResponse> =
jsonHandler<RunDeleteAllResponse>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
override fun deleteAll(
params: RunDeleteAllParams,
requestOptions: RequestOptions,
@@ -292,6 +325,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
private val deleteQueueHandler: Handler<RunDeleteQueueResponse> =
jsonHandler<RunDeleteQueueResponse>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
override fun deleteQueue(
params: RunDeleteQueueParams,
requestOptions: RequestOptions,
@@ -27,6 +27,8 @@ interface ExperimentRunServiceAsync {
/**
* Returns a paginated page of dataset examples with runs from the requested experiments.
* Response uses the canonical `{items, next_cursor}` envelope.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun query(datasetId: String): CompletableFuture<ExperimentRunQueryPageAsync> =
query(datasetId, ExperimentRunQueryParams.none())
@@ -29,6 +29,9 @@ interface RunServiceAsync {
* Fetch examples for a dataset, and fetch the runs for each example if they are associated with
* the given session_ids.
*/
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(
datasetId: String,
params: RunQueryParams,
@@ -36,6 +39,9 @@ interface RunServiceAsync {
query(datasetId, params, RequestOptions.none())
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(
datasetId: String,
params: RunQueryParams,
@@ -44,10 +50,16 @@ interface RunServiceAsync {
query(params.toBuilder().datasetId(datasetId).build(), requestOptions)
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(params: RunQueryParams): CompletableFuture<Optional<List<ExampleWithRunsCh>>> =
query(params, RequestOptions.none())
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(
params: RunQueryParams,
requestOptions: RequestOptions = RequestOptions.none(),
@@ -67,6 +79,9 @@ interface RunServiceAsync {
* Returns a raw HTTP response for `post /api/v1/datasets/{dataset_id}/runs`, but is
* otherwise the same as [RunServiceAsync.query].
*/
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(
datasetId: String,
params: RunQueryParams,
@@ -74,6 +89,9 @@ interface RunServiceAsync {
query(datasetId, params, RequestOptions.none())
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(
datasetId: String,
params: RunQueryParams,
@@ -82,12 +100,18 @@ interface RunServiceAsync {
query(params.toBuilder().datasetId(datasetId).build(), requestOptions)
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(
params: RunQueryParams
): CompletableFuture<HttpResponseFor<Optional<List<ExampleWithRunsCh>>>> =
query(params, RequestOptions.none())
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(
params: RunQueryParams,
requestOptions: RequestOptions = RequestOptions.none(),
@@ -35,6 +35,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
override fun withOptions(modifier: Consumer<ClientOptions.Builder>): RunServiceAsync =
RunServiceAsyncImpl(clientOptions.toBuilder().apply(modifier::accept).build())
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
override fun query(
params: RunQueryParams,
requestOptions: RequestOptions,
@@ -58,6 +61,9 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
private val queryHandler: Handler<Optional<List<ExampleWithRunsCh>>> =
jsonHandler<Optional<List<ExampleWithRunsCh>>>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
override fun query(
params: RunQueryParams,
requestOptions: RequestOptions,
@@ -27,9 +27,10 @@ interface RunServiceAsync {
fun withOptions(modifier: Consumer<ClientOptions.Builder>): RunServiceAsync
/**
* **Alpha:** The request and response contract may change; Returns one run within the trace
* identified by the share token. The request supplies only the run ID and that run's exact
* start_time coordinate.
* Returns one run within the trace identified by the share token. The request supplies only the
* run ID and that run's exact start_time coordinate.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun retrieve(runId: String, params: RunRetrieveParams): CompletableFuture<Run> =
retrieve(runId, params, RequestOptions.none())
@@ -52,8 +53,10 @@ interface RunServiceAsync {
): CompletableFuture<Run>
/**
* **Alpha:** The request and response contract may change; Returns all runs within the trace
* identified by the share token. The share token supplies the tenant, project, and trace scope.
* Returns all runs within the trace identified by the share token. The share token supplies the
* tenant, project, and trace scope.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun query(shareToken: String): CompletableFuture<RunQueryResponse> =
query(shareToken, RunQueryParams.none())
@@ -127,7 +130,7 @@ interface RunServiceAsync {
): CompletableFuture<HttpResponseFor<Run>>
/**
* Returns a raw HTTP response for `post /api/v2/public/{share_token}/runs/v2/query`, but is
* Returns a raw HTTP response for `post /api/v2/public/{share_token}/runs/query`, but is
* otherwise the same as [RunServiceAsync.query].
*/
fun query(shareToken: String): CompletableFuture<HttpResponseFor<RunQueryResponse>> =
@@ -47,7 +47,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
params: RunQueryParams,
requestOptions: RequestOptions,
): CompletableFuture<RunQueryResponse> =
// post /api/v2/public/{share_token}/runs/v2/query
// post /api/v2/public/{share_token}/runs/query
withRawResponse().query(params, requestOptions).thenApply { it.parse() }
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
@@ -116,15 +116,7 @@ class RunServiceAsyncImpl internal constructor(private val clientOptions: Client
HttpRequest.builder()
.method(HttpMethod.POST)
.baseUrl(clientOptions.baseUrl())
.addPathSegments(
"api",
"v2",
"public",
params._pathParam(0),
"runs",
"v2",
"query",
)
.addPathSegments("api", "v2", "public", params._pathParam(0), "runs", "query")
.body(json(clientOptions.jsonMapper, params._body()))
.build()
.prepareAsync(clientOptions, params)
@@ -26,7 +26,11 @@ interface ShareServiceAsync {
*/
fun withOptions(modifier: Consumer<ClientOptions.Builder>): ShareServiceAsync
/** Creates or returns a share token for a run. Child runs share their trace root. */
/**
* Creates or returns a share token for a run. Child runs share their trace root.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun create(runId: String): CompletableFuture<ShareCreateResponse> =
create(runId, ShareCreateParams.none())
@@ -64,6 +68,8 @@ interface ShareServiceAsync {
/**
* Deletes the share token for the trace identified by trace_id and session_id. Idempotent:
* returns 204 whether or not a share token existed.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun delete(traceId: String): CompletableFuture<Void?> =
delete(traceId, ShareDeleteParams.none())
@@ -158,10 +158,16 @@ interface AnnotationQueueService {
): AnnotationQueueSchema
/** Create Identity Annotation Queue Run Status */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(annotationQueueRunId: String): AnnotationQueueCreateRunStatusResponse =
createRunStatus(annotationQueueRunId, AnnotationQueueCreateRunStatusParams.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String,
params: AnnotationQueueCreateRunStatusParams = AnnotationQueueCreateRunStatusParams.none(),
@@ -173,6 +179,9 @@ interface AnnotationQueueService {
)
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String,
params: AnnotationQueueCreateRunStatusParams = AnnotationQueueCreateRunStatusParams.none(),
@@ -180,17 +189,26 @@ interface AnnotationQueueService {
createRunStatus(annotationQueueRunId, params, RequestOptions.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams,
requestOptions: RequestOptions = RequestOptions.none(),
): AnnotationQueueCreateRunStatusResponse
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams
): AnnotationQueueCreateRunStatusResponse = createRunStatus(params, RequestOptions.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
fun createRunStatus(
annotationQueueRunId: String,
requestOptions: RequestOptions,
@@ -303,12 +321,18 @@ interface AnnotationQueueService {
retrieveQueues(runId, AnnotationQueueRetrieveQueuesParams.none(), requestOptions)
/** Get a run from an annotation queue */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
index: Long,
params: AnnotationQueueRetrieveRunParams,
): RunSchemaWithAnnotationQueueInfo = retrieveRun(index, params, RequestOptions.none())
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
index: Long,
params: AnnotationQueueRetrieveRunParams,
@@ -317,20 +341,32 @@ interface AnnotationQueueService {
retrieveRun(params.toBuilder().index(index).build(), requestOptions)
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(params: AnnotationQueueRetrieveRunParams): RunSchemaWithAnnotationQueueInfo =
retrieveRun(params, RequestOptions.none())
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
fun retrieveRun(
params: AnnotationQueueRetrieveRunParams,
requestOptions: RequestOptions = RequestOptions.none(),
): RunSchemaWithAnnotationQueueInfo
/** Get Size From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(queueId: String): AnnotationQueueSizeSchema =
retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
queueId: String,
params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(),
@@ -339,30 +375,48 @@ interface AnnotationQueueService {
retrieveSize(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
queueId: String,
params: AnnotationQueueRetrieveSizeParams = AnnotationQueueRetrieveSizeParams.none(),
): AnnotationQueueSizeSchema = retrieveSize(queueId, params, RequestOptions.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams,
requestOptions: RequestOptions = RequestOptions.none(),
): AnnotationQueueSizeSchema
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(params: AnnotationQueueRetrieveSizeParams): AnnotationQueueSizeSchema =
retrieveSize(params, RequestOptions.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
fun retrieveSize(queueId: String, requestOptions: RequestOptions): AnnotationQueueSizeSchema =
retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none(), requestOptions)
/** Get Total Archived From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(queueId: String): AnnotationQueueSizeSchema =
retrieveTotalArchived(queueId, AnnotationQueueRetrieveTotalArchivedParams.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
queueId: String,
params: AnnotationQueueRetrieveTotalArchivedParams =
@@ -372,6 +426,9 @@ interface AnnotationQueueService {
retrieveTotalArchived(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
queueId: String,
params: AnnotationQueueRetrieveTotalArchivedParams =
@@ -379,17 +436,26 @@ interface AnnotationQueueService {
): AnnotationQueueSizeSchema = retrieveTotalArchived(queueId, params, RequestOptions.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams,
requestOptions: RequestOptions = RequestOptions.none(),
): AnnotationQueueSizeSchema
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams
): AnnotationQueueSizeSchema = retrieveTotalArchived(params, RequestOptions.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalArchived(
queueId: String,
requestOptions: RequestOptions,
@@ -401,10 +467,16 @@ interface AnnotationQueueService {
)
/** Get Total Size From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(queueId: String): AnnotationQueueSizeSchema =
retrieveTotalSize(queueId, AnnotationQueueRetrieveTotalSizeParams.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
queueId: String,
params: AnnotationQueueRetrieveTotalSizeParams =
@@ -414,6 +486,9 @@ interface AnnotationQueueService {
retrieveTotalSize(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
queueId: String,
params: AnnotationQueueRetrieveTotalSizeParams =
@@ -421,17 +496,26 @@ interface AnnotationQueueService {
): AnnotationQueueSizeSchema = retrieveTotalSize(queueId, params, RequestOptions.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams,
requestOptions: RequestOptions = RequestOptions.none(),
): AnnotationQueueSizeSchema
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams
): AnnotationQueueSizeSchema = retrieveTotalSize(params, RequestOptions.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
fun retrieveTotalSize(
queueId: String,
requestOptions: RequestOptions,
@@ -617,6 +701,9 @@ interface AnnotationQueueService {
* /api/v1/annotation-queues/status/{annotation_queue_run_id}`, but is otherwise the same as
* [AnnotationQueueService.createRunStatus].
*/
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun createRunStatus(
annotationQueueRunId: String
@@ -624,6 +711,9 @@ interface AnnotationQueueService {
createRunStatus(annotationQueueRunId, AnnotationQueueCreateRunStatusParams.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun createRunStatus(
annotationQueueRunId: String,
@@ -637,6 +727,9 @@ interface AnnotationQueueService {
)
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun createRunStatus(
annotationQueueRunId: String,
@@ -646,6 +739,9 @@ interface AnnotationQueueService {
createRunStatus(annotationQueueRunId, params, RequestOptions.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams,
@@ -653,6 +749,9 @@ interface AnnotationQueueService {
): HttpResponseFor<AnnotationQueueCreateRunStatusResponse>
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams
@@ -660,6 +759,9 @@ interface AnnotationQueueService {
createRunStatus(params, RequestOptions.none())
/** @see createRunStatus */
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun createRunStatus(
annotationQueueRunId: String,
@@ -821,6 +923,9 @@ interface AnnotationQueueService {
* Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/run/{index}`,
* but is otherwise the same as [AnnotationQueueService.retrieveRun].
*/
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveRun(
index: Long,
@@ -829,6 +934,9 @@ interface AnnotationQueueService {
retrieveRun(index, params, RequestOptions.none())
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveRun(
index: Long,
@@ -838,6 +946,9 @@ interface AnnotationQueueService {
retrieveRun(params.toBuilder().index(index).build(), requestOptions)
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveRun(
params: AnnotationQueueRetrieveRunParams
@@ -845,6 +956,9 @@ interface AnnotationQueueService {
retrieveRun(params, RequestOptions.none())
/** @see retrieveRun */
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveRun(
params: AnnotationQueueRetrieveRunParams,
@@ -855,11 +969,17 @@ interface AnnotationQueueService {
* Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/size`, but is
* otherwise the same as [AnnotationQueueService.retrieveSize].
*/
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveSize(queueId: String): HttpResponseFor<AnnotationQueueSizeSchema> =
retrieveSize(queueId, AnnotationQueueRetrieveSizeParams.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveSize(
queueId: String,
@@ -869,6 +989,9 @@ interface AnnotationQueueService {
retrieveSize(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveSize(
queueId: String,
@@ -877,6 +1000,9 @@ interface AnnotationQueueService {
retrieveSize(queueId, params, RequestOptions.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams,
@@ -884,12 +1010,18 @@ interface AnnotationQueueService {
): HttpResponseFor<AnnotationQueueSizeSchema>
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams
): HttpResponseFor<AnnotationQueueSizeSchema> = retrieveSize(params, RequestOptions.none())
/** @see retrieveSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveSize(
queueId: String,
@@ -902,11 +1034,17 @@ interface AnnotationQueueService {
* /api/v1/annotation-queues/{queue_id}/total_archived`, but is otherwise the same as
* [AnnotationQueueService.retrieveTotalArchived].
*/
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalArchived(queueId: String): HttpResponseFor<AnnotationQueueSizeSchema> =
retrieveTotalArchived(queueId, AnnotationQueueRetrieveTotalArchivedParams.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalArchived(
queueId: String,
@@ -917,6 +1055,9 @@ interface AnnotationQueueService {
retrieveTotalArchived(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalArchived(
queueId: String,
@@ -926,6 +1067,9 @@ interface AnnotationQueueService {
retrieveTotalArchived(queueId, params, RequestOptions.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams,
@@ -933,6 +1077,9 @@ interface AnnotationQueueService {
): HttpResponseFor<AnnotationQueueSizeSchema>
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams
@@ -940,6 +1087,9 @@ interface AnnotationQueueService {
retrieveTotalArchived(params, RequestOptions.none())
/** @see retrieveTotalArchived */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalArchived(
queueId: String,
@@ -955,11 +1105,17 @@ interface AnnotationQueueService {
* Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/total_size`,
* but is otherwise the same as [AnnotationQueueService.retrieveTotalSize].
*/
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalSize(queueId: String): HttpResponseFor<AnnotationQueueSizeSchema> =
retrieveTotalSize(queueId, AnnotationQueueRetrieveTotalSizeParams.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalSize(
queueId: String,
@@ -970,6 +1126,9 @@ interface AnnotationQueueService {
retrieveTotalSize(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalSize(
queueId: String,
@@ -979,6 +1138,9 @@ interface AnnotationQueueService {
retrieveTotalSize(queueId, params, RequestOptions.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams,
@@ -986,6 +1148,9 @@ interface AnnotationQueueService {
): HttpResponseFor<AnnotationQueueSizeSchema>
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams
@@ -993,6 +1158,9 @@ interface AnnotationQueueService {
retrieveTotalSize(params, RequestOptions.none())
/** @see retrieveTotalSize */
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveTotalSize(
queueId: String,
@@ -95,6 +95,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions:
// post /api/v1/annotation-queues
withRawResponse().annotationQueues(params, requestOptions).parse()
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
override fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams,
requestOptions: RequestOptions,
@@ -130,6 +133,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions:
// get /api/v1/annotation-queues/{run_id}/queues
withRawResponse().retrieveQueues(params, requestOptions).parse()
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
override fun retrieveRun(
params: AnnotationQueueRetrieveRunParams,
requestOptions: RequestOptions,
@@ -137,6 +143,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions:
// get /api/v1/annotation-queues/{queue_id}/run/{index}
withRawResponse().retrieveRun(params, requestOptions).parse()
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
override fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams,
requestOptions: RequestOptions,
@@ -144,6 +153,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions:
// get /api/v1/annotation-queues/{queue_id}/size
withRawResponse().retrieveSize(params, requestOptions).parse()
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
override fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams,
requestOptions: RequestOptions,
@@ -151,6 +163,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions:
// get /api/v1/annotation-queues/{queue_id}/total_archived
withRawResponse().retrieveTotalArchived(params, requestOptions).parse()
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
override fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams,
requestOptions: RequestOptions,
@@ -306,6 +321,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions:
private val createRunStatusHandler: Handler<AnnotationQueueCreateRunStatusResponse> =
jsonHandler<AnnotationQueueCreateRunStatusResponse>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items create_status method (POST /api/v1/platform/annotation-queues/items/{queue_item_id}/status) instead. Will be removed after Jan 31, 2027."
)
override fun createRunStatus(
params: AnnotationQueueCreateRunStatusParams,
requestOptions: RequestOptions,
@@ -481,6 +499,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions:
private val retrieveRunHandler: Handler<RunSchemaWithAnnotationQueueInfo> =
jsonHandler<RunSchemaWithAnnotationQueueInfo>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items list and retrieve_placement methods instead, which call GET /api/v1/platform/annotation-queues/{queue_id}/items and GET /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}/placement. Will be removed after Jan 31, 2027."
)
override fun retrieveRun(
params: AnnotationQueueRetrieveRunParams,
requestOptions: RequestOptions,
@@ -518,6 +539,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions:
private val retrieveSizeHandler: Handler<AnnotationQueueSizeSchema> =
jsonHandler<AnnotationQueueSizeSchema>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count) with the desired status instead. Will be removed after Jan 31, 2027."
)
override fun retrieveSize(
params: AnnotationQueueRetrieveSizeParams,
requestOptions: RequestOptions,
@@ -548,6 +572,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions:
private val retrieveTotalArchivedHandler: Handler<AnnotationQueueSizeSchema> =
jsonHandler<AnnotationQueueSizeSchema>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=archived) instead. Will be removed after Jan 31, 2027."
)
override fun retrieveTotalArchived(
params: AnnotationQueueRetrieveTotalArchivedParams,
requestOptions: RequestOptions,
@@ -584,6 +611,9 @@ class AnnotationQueueServiceImpl internal constructor(private val clientOptions:
private val retrieveTotalSizeHandler: Handler<AnnotationQueueSizeSchema> =
jsonHandler<AnnotationQueueSizeSchema>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items retrieve_count method (GET /api/v1/platform/annotation-queues/{queue_id}/items/count?status=all) instead. Will be removed after Jan 31, 2027."
)
override fun retrieveTotalSize(
params: AnnotationQueueRetrieveTotalSizeParams,
requestOptions: RequestOptions,
@@ -101,6 +101,8 @@ interface RunService {
/**
* Returns the URL to view a specific run in the LangSmith UI. The caller must supply the run's
* project_id and trace_id as query parameters; start_time is optional.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun getUrl(runId: String, params: RunGetUrlParams): RunGetUrlResponse =
getUrl(runId, params, RequestOptions.none())
@@ -180,26 +182,39 @@ interface RunService {
)
/** Query Runs */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(): RunQueryV1Page = queryV1(RunQueryV1Params.none())
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(
params: RunQueryV1Params = RunQueryV1Params.none(),
requestOptions: RequestOptions = RequestOptions.none(),
): RunQueryV1Page
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(params: RunQueryV1Params = RunQueryV1Params.none()): RunQueryV1Page =
queryV1(params, RequestOptions.none())
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun queryV1(requestOptions: RequestOptions): RunQueryV1Page =
queryV1(RunQueryV1Params.none(), requestOptions)
/**
* **Alpha:** The request and response contract may change; Returns a paginated list of runs for
* the given projects within min/max start_time. Supports filters, cursor pagination, and
* `selects` to select fields to return.
* Returns a paginated list of runs for the given projects within min/max start_time. Supports
* filters, cursor pagination, and `selects` to select fields to return.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun queryV2(): RunQueryV2Page = queryV2(RunQueryV2Params.none())
@@ -218,9 +233,15 @@ interface RunService {
queryV2(RunQueryV2Params.none(), requestOptions)
/** Get a specific run. */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(runId: String): RunSchema = retrieveV1(runId, RunRetrieveV1Params.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(
runId: String,
params: RunRetrieveV1Params = RunRetrieveV1Params.none(),
@@ -228,28 +249,42 @@ interface RunService {
): RunSchema = retrieveV1(params.toBuilder().runId(runId).build(), requestOptions)
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(
runId: String,
params: RunRetrieveV1Params = RunRetrieveV1Params.none(),
): RunSchema = retrieveV1(runId, params, RequestOptions.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(
params: RunRetrieveV1Params,
requestOptions: RequestOptions = RequestOptions.none(),
): RunSchema
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(params: RunRetrieveV1Params): RunSchema =
retrieveV1(params, RequestOptions.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
fun retrieveV1(runId: String, requestOptions: RequestOptions): RunSchema =
retrieveV1(runId, RunRetrieveV1Params.none(), requestOptions)
/**
* **Alpha:** The request and response contract may change; Returns one run by ID for the given
* session. Use the `selects` query parameter (repeatable) to select fields to return.
* Returns one run by ID for the given session. Use the `selects` query parameter (repeatable)
* to select fields to return.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun retrieveV2(runId: String, params: RunRetrieveV2Params): Run =
retrieveV2(runId, params, RequestOptions.none())
@@ -533,10 +568,16 @@ interface RunService {
* Returns a raw HTTP response for `post /api/v1/runs/query`, but is otherwise the same as
* [RunService.queryV1].
*/
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun queryV1(): HttpResponseFor<RunQueryV1Page> = queryV1(RunQueryV1Params.none())
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun queryV1(
params: RunQueryV1Params = RunQueryV1Params.none(),
@@ -544,12 +585,18 @@ interface RunService {
): HttpResponseFor<RunQueryV1Page>
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun queryV1(
params: RunQueryV1Params = RunQueryV1Params.none()
): HttpResponseFor<RunQueryV1Page> = queryV1(params, RequestOptions.none())
/** @see queryV1 */
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun queryV1(requestOptions: RequestOptions): HttpResponseFor<RunQueryV1Page> =
queryV1(RunQueryV1Params.none(), requestOptions)
@@ -583,11 +630,17 @@ interface RunService {
* Returns a raw HTTP response for `get /api/v1/runs/{run_id}`, but is otherwise the same as
* [RunService.retrieveV1].
*/
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveV1(runId: String): HttpResponseFor<RunSchema> =
retrieveV1(runId, RunRetrieveV1Params.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveV1(
runId: String,
@@ -597,6 +650,9 @@ interface RunService {
retrieveV1(params.toBuilder().runId(runId).build(), requestOptions)
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveV1(
runId: String,
@@ -604,6 +660,9 @@ interface RunService {
): HttpResponseFor<RunSchema> = retrieveV1(runId, params, RequestOptions.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveV1(
params: RunRetrieveV1Params,
@@ -611,11 +670,17 @@ interface RunService {
): HttpResponseFor<RunSchema>
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveV1(params: RunRetrieveV1Params): HttpResponseFor<RunSchema> =
retrieveV1(params, RequestOptions.none())
/** @see retrieveV1 */
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun retrieveV1(runId: String, requestOptions: RequestOptions): HttpResponseFor<RunSchema> =
retrieveV1(runId, RunRetrieveV1Params.none(), requestOptions)
@@ -210,6 +210,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
requestOptions: RequestOptions,
): Void? = withRawResponse().multipartIngest(create, update, requestOptions).parse()
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
override fun queryV1(params: RunQueryV1Params, requestOptions: RequestOptions): RunQueryV1Page =
// post /api/v1/runs/query
withRawResponse().queryV1(params, requestOptions).parse()
@@ -218,6 +221,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
// post /api/v2/runs/query
withRawResponse().queryV2(params, requestOptions).parse()
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
override fun retrieveV1(
params: RunRetrieveV1Params,
requestOptions: RequestOptions,
@@ -461,6 +467,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
private val queryV1Handler: Handler<RunQueryV1PageResponse> =
jsonHandler<RunQueryV1PageResponse>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use queryV2 instead, which calls /api/v2/runs/query. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
override fun queryV1(
params: RunQueryV1Params,
requestOptions: RequestOptions,
@@ -531,6 +540,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
private val retrieveV1Handler: Handler<RunSchema> =
jsonHandler<RunSchema>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use retrieveV2 instead, which calls /api/v2/runs/{run_id}. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#runs-retrieve for the migration guide. Will be removed after Jan 31, 2027."
)
override fun retrieveV1(
params: RunRetrieveV1Params,
requestOptions: RequestOptions,
@@ -29,8 +29,9 @@ interface ThreadService {
fun withOptions(modifier: Consumer<ClientOptions.Builder>): ThreadService
/**
* **Alpha:** The request and response contract may change; Retrieve all traces belonging to a
* specific thread within a project.
* Retrieve all traces belonging to a specific thread within a project.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun listTraces(threadId: String, params: ThreadListTracesParams): ThreadListTracesPage =
listTraces(threadId, params, RequestOptions.none())
@@ -54,9 +55,10 @@ interface ThreadService {
): ThreadListTracesPage
/**
* **Alpha:** The request and response contract may change; Query threads within a project
* (session), with cursor-based pagination. Returns threads matching the given time range and
* optional filter.
* Query threads within a project (session), with cursor-based pagination. Returns threads
* matching the given time range and optional filter.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun query(): ThreadQueryPage = query(ThreadQueryParams.none())
@@ -75,9 +77,10 @@ interface ThreadService {
query(ThreadQueryParams.none(), requestOptions)
/**
* **Alpha:** The request and response contract may change; Compute aggregate stats for a single
* thread (turn count, latency percentiles, token/cost sums, and detail breakdowns) within a
* project.
* Compute aggregate stats for a single thread (turn count, latency percentiles, token/cost
* sums, and detail breakdowns) within a project.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun stats(threadId: String, params: ThreadStatsParams): ThreadStats =
stats(threadId, params, RequestOptions.none())
@@ -27,8 +27,10 @@ interface TraceService {
fun withOptions(modifier: Consumer<ClientOptions.Builder>): TraceService
/**
* **Alpha:** The request and response contract may change; Returns runs for a trace ID within
* min/max start time. Optional `filter`; repeatable `selects` to select fields to return.
* Returns runs for a trace ID within min/max start time. Optional `filter`; repeatable
* `selects` to select fields to return.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun listRuns(traceId: String, params: TraceListRunsParams): TraceListRunsResponse =
listRuns(traceId, params, RequestOptions.none())
@@ -62,6 +64,8 @@ interface TraceService {
*
* Supports filters (`trace_filter`, `tree_filter`), cursor pagination (`cursor`), and field
* projection (`selects`).
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun query(): TraceQueryPage = query(TraceQueryParams.none())
@@ -35,10 +35,16 @@ interface RunService {
fun withOptions(modifier: Consumer<ClientOptions.Builder>): RunService
/** Add Runs To Annotation Queue */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(queueId: String, params: RunCreateParams): List<RunCreateResponse> =
create(queueId, params, RequestOptions.none())
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(
queueId: String,
params: RunCreateParams,
@@ -46,20 +52,32 @@ interface RunService {
): List<RunCreateResponse> = create(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(params: RunCreateParams): List<RunCreateResponse> =
create(params, RequestOptions.none())
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun create(
params: RunCreateParams,
requestOptions: RequestOptions = RequestOptions.none(),
): List<RunCreateResponse>
/** Update Run In Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(queueRunId: String, params: RunUpdateParams): RunUpdateResponse =
update(queueRunId, params, RequestOptions.none())
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(
queueRunId: String,
params: RunUpdateParams,
@@ -67,19 +85,31 @@ interface RunService {
): RunUpdateResponse = update(params.toBuilder().queueRunId(queueRunId).build(), requestOptions)
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(params: RunUpdateParams): RunUpdateResponse = update(params, RequestOptions.none())
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
fun update(
params: RunUpdateParams,
requestOptions: RequestOptions = RequestOptions.none(),
): RunUpdateResponse
/** Get Runs From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(queueId: String): List<RunSchemaWithAnnotationQueueInfo> =
list(queueId, RunListParams.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
queueId: String,
params: RunListParams = RunListParams.none(),
@@ -88,32 +118,50 @@ interface RunService {
list(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
queueId: String,
params: RunListParams = RunListParams.none(),
): List<RunSchemaWithAnnotationQueueInfo> = list(queueId, params, RequestOptions.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
params: RunListParams,
requestOptions: RequestOptions = RequestOptions.none(),
): List<RunSchemaWithAnnotationQueueInfo>
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(params: RunListParams): List<RunSchemaWithAnnotationQueueInfo> =
list(params, RequestOptions.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
fun list(
queueId: String,
requestOptions: RequestOptions,
): List<RunSchemaWithAnnotationQueueInfo> = list(queueId, RunListParams.none(), requestOptions)
/** Add Runs To Annotation Queue By Key */
/** Self-hosted deployments require LangSmith `v0.16` or later. */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(queueId: String, params: RunCreateByKeyParams): List<RunCreateByKeyResponse> =
createByKey(queueId, params, RequestOptions.none())
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(
queueId: String,
params: RunCreateByKeyParams,
@@ -122,20 +170,32 @@ interface RunService {
createByKey(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(params: RunCreateByKeyParams): List<RunCreateByKeyResponse> =
createByKey(params, RequestOptions.none())
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
fun createByKey(
params: RunCreateByKeyParams,
requestOptions: RequestOptions = RequestOptions.none(),
): List<RunCreateByKeyResponse>
/** Delete Runs From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(queueId: String): RunDeleteAllResponse =
deleteAll(queueId, RunDeleteAllParams.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
queueId: String,
params: RunDeleteAllParams = RunDeleteAllParams.none(),
@@ -143,30 +203,48 @@ interface RunService {
): RunDeleteAllResponse = deleteAll(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
queueId: String,
params: RunDeleteAllParams = RunDeleteAllParams.none(),
): RunDeleteAllResponse = deleteAll(queueId, params, RequestOptions.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(
params: RunDeleteAllParams,
requestOptions: RequestOptions = RequestOptions.none(),
): RunDeleteAllResponse
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(params: RunDeleteAllParams): RunDeleteAllResponse =
deleteAll(params, RequestOptions.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
fun deleteAll(queueId: String, requestOptions: RequestOptions): RunDeleteAllResponse =
deleteAll(queueId, RunDeleteAllParams.none(), requestOptions)
/** Delete Run From Annotation Queue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(queueRunId: String, params: RunDeleteQueueParams): RunDeleteQueueResponse =
deleteQueue(queueRunId, params, RequestOptions.none())
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(
queueRunId: String,
params: RunDeleteQueueParams,
@@ -175,10 +253,16 @@ interface RunService {
deleteQueue(params.toBuilder().queueRunId(queueRunId).build(), requestOptions)
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(params: RunDeleteQueueParams): RunDeleteQueueResponse =
deleteQueue(params, RequestOptions.none())
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
fun deleteQueue(
params: RunDeleteQueueParams,
requestOptions: RequestOptions = RequestOptions.none(),
@@ -198,6 +282,9 @@ interface RunService {
* Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs`, but is
* otherwise the same as [RunService.create].
*/
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun create(
queueId: String,
@@ -205,6 +292,9 @@ interface RunService {
): HttpResponseFor<List<RunCreateResponse>> = create(queueId, params, RequestOptions.none())
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun create(
queueId: String,
@@ -214,11 +304,17 @@ interface RunService {
create(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun create(params: RunCreateParams): HttpResponseFor<List<RunCreateResponse>> =
create(params, RequestOptions.none())
/** @see create */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun create(
params: RunCreateParams,
@@ -230,6 +326,9 @@ interface RunService {
* /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id}`, but is otherwise the same as
* [RunService.update].
*/
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun update(
queueRunId: String,
@@ -237,6 +336,9 @@ interface RunService {
): HttpResponseFor<RunUpdateResponse> = update(queueRunId, params, RequestOptions.none())
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun update(
queueRunId: String,
@@ -246,11 +348,17 @@ interface RunService {
update(params.toBuilder().queueRunId(queueRunId).build(), requestOptions)
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun update(params: RunUpdateParams): HttpResponseFor<RunUpdateResponse> =
update(params, RequestOptions.none())
/** @see update */
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun update(
params: RunUpdateParams,
@@ -261,11 +369,17 @@ interface RunService {
* Returns a raw HTTP response for `get /api/v1/annotation-queues/{queue_id}/runs`, but is
* otherwise the same as [RunService.list].
*/
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun list(queueId: String): HttpResponseFor<List<RunSchemaWithAnnotationQueueInfo>> =
list(queueId, RunListParams.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun list(
queueId: String,
@@ -275,6 +389,9 @@ interface RunService {
list(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun list(
queueId: String,
@@ -283,6 +400,9 @@ interface RunService {
list(queueId, params, RequestOptions.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun list(
params: RunListParams,
@@ -290,11 +410,17 @@ interface RunService {
): HttpResponseFor<List<RunSchemaWithAnnotationQueueInfo>>
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun list(params: RunListParams): HttpResponseFor<List<RunSchemaWithAnnotationQueueInfo>> =
list(params, RequestOptions.none())
/** @see list */
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun list(
queueId: String,
@@ -306,6 +432,9 @@ interface RunService {
* Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs/by-key`,
* but is otherwise the same as [RunService.createByKey].
*/
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun createByKey(
queueId: String,
@@ -314,6 +443,9 @@ interface RunService {
createByKey(queueId, params, RequestOptions.none())
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun createByKey(
queueId: String,
@@ -323,6 +455,9 @@ interface RunService {
createByKey(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun createByKey(
params: RunCreateByKeyParams
@@ -330,6 +465,9 @@ interface RunService {
createByKey(params, RequestOptions.none())
/** @see createByKey */
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun createByKey(
params: RunCreateByKeyParams,
@@ -340,11 +478,17 @@ interface RunService {
* Returns a raw HTTP response for `post /api/v1/annotation-queues/{queue_id}/runs/delete`,
* but is otherwise the same as [RunService.deleteAll].
*/
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun deleteAll(queueId: String): HttpResponseFor<RunDeleteAllResponse> =
deleteAll(queueId, RunDeleteAllParams.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun deleteAll(
queueId: String,
@@ -354,6 +498,9 @@ interface RunService {
deleteAll(params.toBuilder().queueId(queueId).build(), requestOptions)
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun deleteAll(
queueId: String,
@@ -361,6 +508,9 @@ interface RunService {
): HttpResponseFor<RunDeleteAllResponse> = deleteAll(queueId, params, RequestOptions.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun deleteAll(
params: RunDeleteAllParams,
@@ -368,11 +518,17 @@ interface RunService {
): HttpResponseFor<RunDeleteAllResponse>
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun deleteAll(params: RunDeleteAllParams): HttpResponseFor<RunDeleteAllResponse> =
deleteAll(params, RequestOptions.none())
/** @see deleteAll */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun deleteAll(
queueId: String,
@@ -385,6 +541,9 @@ interface RunService {
* /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id}`, but is otherwise the same as
* [RunService.deleteQueue].
*/
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun deleteQueue(
queueRunId: String,
@@ -393,6 +552,9 @@ interface RunService {
deleteQueue(queueRunId, params, RequestOptions.none())
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun deleteQueue(
queueRunId: String,
@@ -402,11 +564,17 @@ interface RunService {
deleteQueue(params.toBuilder().queueRunId(queueRunId).build(), requestOptions)
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun deleteQueue(params: RunDeleteQueueParams): HttpResponseFor<RunDeleteQueueResponse> =
deleteQueue(params, RequestOptions.none())
/** @see deleteQueue */
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun deleteQueue(
params: RunDeleteQueueParams,
@@ -42,6 +42,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
override fun withOptions(modifier: Consumer<ClientOptions.Builder>): RunService =
RunServiceImpl(clientOptions.toBuilder().apply(modifier::accept).build())
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
override fun create(
params: RunCreateParams,
requestOptions: RequestOptions,
@@ -49,6 +52,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
// post /api/v1/annotation-queues/{queue_id}/runs
withRawResponse().create(params, requestOptions).parse()
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
override fun update(
params: RunUpdateParams,
requestOptions: RequestOptions,
@@ -56,6 +62,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
// patch /api/v1/annotation-queues/{queue_id}/runs/{queue_run_id}
withRawResponse().update(params, requestOptions).parse()
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
override fun list(
params: RunListParams,
requestOptions: RequestOptions,
@@ -63,6 +72,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
// get /api/v1/annotation-queues/{queue_id}/runs
withRawResponse().list(params, requestOptions).parse()
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
override fun createByKey(
params: RunCreateByKeyParams,
requestOptions: RequestOptions,
@@ -70,6 +82,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
// post /api/v1/annotation-queues/{queue_id}/runs/by-key
withRawResponse().createByKey(params, requestOptions).parse()
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
override fun deleteAll(
params: RunDeleteAllParams,
requestOptions: RequestOptions,
@@ -77,6 +92,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
// post /api/v1/annotation-queues/{queue_id}/runs/delete
withRawResponse().deleteAll(params, requestOptions).parse()
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
override fun deleteQueue(
params: RunDeleteQueueParams,
requestOptions: RequestOptions,
@@ -100,6 +118,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
private val createHandler: Handler<List<RunCreateResponse>> =
jsonHandler<List<RunCreateResponse>>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
override fun create(
params: RunCreateParams,
requestOptions: RequestOptions,
@@ -131,6 +152,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
private val updateHandler: Handler<RunUpdateResponse> =
jsonHandler<RunUpdateResponse>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items update method (PATCH /api/v1/platform/annotation-queues/{queue_id}/items/{item_id}) instead. Will be removed after Jan 31, 2027."
)
override fun update(
params: RunUpdateParams,
requestOptions: RequestOptions,
@@ -169,6 +193,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
private val listHandler: Handler<List<RunSchemaWithAnnotationQueueInfo>> =
jsonHandler<List<RunSchemaWithAnnotationQueueInfo>>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items list method (GET /api/v1/platform/annotation-queues/{queue_id}/items) instead. Will be removed after Jan 31, 2027."
)
override fun list(
params: RunListParams,
requestOptions: RequestOptions,
@@ -199,6 +226,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
private val createByKeyHandler: Handler<List<RunCreateByKeyResponse>> =
jsonHandler<List<RunCreateByKeyResponse>>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use annotationQueues().items().create() instead. Will be removed after Jan 31, 2027."
)
override fun createByKey(
params: RunCreateByKeyParams,
requestOptions: RequestOptions,
@@ -237,6 +267,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
private val deleteAllHandler: Handler<RunDeleteAllResponse> =
jsonHandler<RunDeleteAllResponse>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) instead. Will be removed after Jan 31, 2027."
)
override fun deleteAll(
params: RunDeleteAllParams,
requestOptions: RequestOptions,
@@ -275,6 +308,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
private val deleteQueueHandler: Handler<RunDeleteQueueResponse> =
jsonHandler<RunDeleteQueueResponse>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use the annotation queue items delete_all method (POST /api/v1/platform/annotation-queues/{queue_id}/items/delete) with the item ID instead. Will be removed after Jan 31, 2027."
)
override fun deleteQueue(
params: RunDeleteQueueParams,
requestOptions: RequestOptions,
@@ -27,6 +27,8 @@ interface ExperimentRunService {
/**
* Returns a paginated page of dataset examples with runs from the requested experiments.
* Response uses the canonical `{items, next_cursor}` envelope.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun query(datasetId: String): ExperimentRunQueryPage =
query(datasetId, ExperimentRunQueryParams.none())
@@ -29,10 +29,16 @@ interface RunService {
* Fetch examples for a dataset, and fetch the runs for each example if they are associated with
* the given session_ids.
*/
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(datasetId: String, params: RunQueryParams): Optional<List<ExampleWithRunsCh>> =
query(datasetId, params, RequestOptions.none())
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(
datasetId: String,
params: RunQueryParams,
@@ -41,10 +47,16 @@ interface RunService {
query(params.toBuilder().datasetId(datasetId).build(), requestOptions)
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(params: RunQueryParams): Optional<List<ExampleWithRunsCh>> =
query(params, RequestOptions.none())
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
fun query(
params: RunQueryParams,
requestOptions: RequestOptions = RequestOptions.none(),
@@ -64,6 +76,9 @@ interface RunService {
* Returns a raw HTTP response for `post /api/v1/datasets/{dataset_id}/runs`, but is
* otherwise the same as [RunService.query].
*/
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun query(
datasetId: String,
@@ -72,6 +87,9 @@ interface RunService {
query(datasetId, params, RequestOptions.none())
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun query(
datasetId: String,
@@ -81,11 +99,17 @@ interface RunService {
query(params.toBuilder().datasetId(datasetId).build(), requestOptions)
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun query(params: RunQueryParams): HttpResponseFor<Optional<List<ExampleWithRunsCh>>> =
query(params, RequestOptions.none())
/** @see query */
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
@MustBeClosed
fun query(
params: RunQueryParams,
@@ -33,6 +33,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
override fun withOptions(modifier: Consumer<ClientOptions.Builder>): RunService =
RunServiceImpl(clientOptions.toBuilder().apply(modifier::accept).build())
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
override fun query(
params: RunQueryParams,
requestOptions: RequestOptions,
@@ -56,6 +59,9 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
private val queryHandler: Handler<Optional<List<ExampleWithRunsCh>>> =
jsonHandler<Optional<List<ExampleWithRunsCh>>>(clientOptions.jsonMapper)
@Deprecated(
"Deprecated: use datasets.experimentRuns.query() instead, which calls POST /api/v2/datasets/{dataset_id}/experiment-runs. See https://docs.langchain.com/langsmith/smithdb-sdk-migration#dataset-experiment-runs-query for the migration guide. Will be removed after Jan 31, 2027."
)
override fun query(
params: RunQueryParams,
requestOptions: RequestOptions,
@@ -27,9 +27,10 @@ interface RunService {
fun withOptions(modifier: Consumer<ClientOptions.Builder>): RunService
/**
* **Alpha:** The request and response contract may change; Returns one run within the trace
* identified by the share token. The request supplies only the run ID and that run's exact
* start_time coordinate.
* Returns one run within the trace identified by the share token. The request supplies only the
* run ID and that run's exact start_time coordinate.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun retrieve(runId: String, params: RunRetrieveParams): Run =
retrieve(runId, params, RequestOptions.none())
@@ -51,8 +52,10 @@ interface RunService {
): Run
/**
* **Alpha:** The request and response contract may change; Returns all runs within the trace
* identified by the share token. The share token supplies the tenant, project, and trace scope.
* Returns all runs within the trace identified by the share token. The share token supplies the
* tenant, project, and trace scope.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun query(shareToken: String): RunQueryResponse = query(shareToken, RunQueryParams.none())
@@ -121,7 +124,7 @@ interface RunService {
): HttpResponseFor<Run>
/**
* Returns a raw HTTP response for `post /api/v2/public/{share_token}/runs/v2/query`, but is
* Returns a raw HTTP response for `post /api/v2/public/{share_token}/runs/query`, but is
* otherwise the same as [RunService.query].
*/
@MustBeClosed
@@ -39,7 +39,7 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
withRawResponse().retrieve(params, requestOptions).parse()
override fun query(params: RunQueryParams, requestOptions: RequestOptions): RunQueryResponse =
// post /api/v2/public/{share_token}/runs/v2/query
// post /api/v2/public/{share_token}/runs/query
withRawResponse().query(params, requestOptions).parse()
class WithRawResponseImpl internal constructor(private val clientOptions: ClientOptions) :
@@ -105,15 +105,7 @@ class RunServiceImpl internal constructor(private val clientOptions: ClientOptio
HttpRequest.builder()
.method(HttpMethod.POST)
.baseUrl(clientOptions.baseUrl())
.addPathSegments(
"api",
"v2",
"public",
params._pathParam(0),
"runs",
"v2",
"query",
)
.addPathSegments("api", "v2", "public", params._pathParam(0), "runs", "query")
.body(json(clientOptions.jsonMapper, params._body()))
.build()
.prepare(clientOptions, params)
@@ -26,7 +26,11 @@ interface ShareService {
*/
fun withOptions(modifier: Consumer<ClientOptions.Builder>): ShareService
/** Creates or returns a share token for a run. Child runs share their trace root. */
/**
* Creates or returns a share token for a run. Child runs share their trace root.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun create(runId: String): ShareCreateResponse = create(runId, ShareCreateParams.none())
/** @see create */
@@ -59,6 +63,8 @@ interface ShareService {
/**
* Deletes the share token for the trace identified by trace_id and session_id. Idempotent:
* returns 204 whether or not a share token existed.
*
* Self-hosted deployments require LangSmith `v0.16` or later.
*/
fun delete(traceId: String) = delete(traceId, ShareDeleteParams.none())