langsmith 0.7.8 → 0.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +161 -15
- package/dist/_openapi_client/client.cjs +814 -0
- package/dist/_openapi_client/client.d.ts +247 -0
- package/dist/_openapi_client/client.js +777 -0
- package/dist/_openapi_client/core/api-promise.cjs +100 -0
- package/dist/_openapi_client/core/api-promise.d.ts +45 -0
- package/dist/_openapi_client/core/api-promise.js +96 -0
- package/dist/_openapi_client/core/error.cjs +134 -0
- package/dist/_openapi_client/core/error.d.ts +45 -0
- package/dist/_openapi_client/core/error.js +118 -0
- package/dist/_openapi_client/core/pagination.cjs +374 -0
- package/dist/_openapi_client/core/pagination.d.ts +157 -0
- package/dist/_openapi_client/core/pagination.js +361 -0
- package/dist/_openapi_client/core/resource.cjs +17 -0
- package/dist/_openapi_client/core/resource.d.ts +5 -0
- package/dist/_openapi_client/core/resource.js +13 -0
- package/dist/_openapi_client/core/uploads.cjs +5 -0
- package/dist/_openapi_client/core/uploads.d.ts +2 -0
- package/dist/_openapi_client/core/uploads.js +1 -0
- package/dist/_openapi_client/index.cjs +29 -0
- package/dist/_openapi_client/index.d.ts +6 -0
- package/dist/_openapi_client/index.js +8 -0
- package/dist/_openapi_client/internal/builtin-types.cjs +4 -0
- package/dist/_openapi_client/internal/builtin-types.d.ts +72 -0
- package/dist/_openapi_client/internal/builtin-types.js +3 -0
- package/dist/_openapi_client/internal/detect-platform.cjs +162 -0
- package/dist/_openapi_client/internal/detect-platform.d.ts +14 -0
- package/dist/_openapi_client/internal/detect-platform.js +157 -0
- package/dist/_openapi_client/internal/errors.cjs +41 -0
- package/dist/_openapi_client/internal/errors.d.ts +2 -0
- package/dist/_openapi_client/internal/errors.js +36 -0
- package/dist/_openapi_client/internal/headers.cjs +79 -0
- package/dist/_openapi_client/internal/headers.d.ts +18 -0
- package/dist/_openapi_client/internal/headers.js +74 -0
- package/dist/_openapi_client/internal/parse.cjs +40 -0
- package/dist/_openapi_client/internal/parse.d.ts +11 -0
- package/dist/_openapi_client/internal/parse.js +37 -0
- package/dist/_openapi_client/internal/qs/formats.cjs +12 -0
- package/dist/_openapi_client/internal/qs/formats.d.ts +6 -0
- package/dist/_openapi_client/internal/qs/formats.js +8 -0
- package/dist/_openapi_client/internal/qs/stringify.cjs +277 -0
- package/dist/_openapi_client/internal/qs/stringify.d.ts +2 -0
- package/dist/_openapi_client/internal/qs/stringify.js +274 -0
- package/dist/_openapi_client/internal/qs/types.cjs +2 -0
- package/dist/_openapi_client/internal/qs/types.d.ts +56 -0
- package/dist/_openapi_client/internal/qs/types.js +1 -0
- package/dist/_openapi_client/internal/qs/utils.cjs +230 -0
- package/dist/_openapi_client/internal/qs/utils.d.ts +14 -0
- package/dist/_openapi_client/internal/qs/utils.js +217 -0
- package/dist/_openapi_client/internal/request-options.cjs +14 -0
- package/dist/_openapi_client/internal/request-options.d.ts +74 -0
- package/dist/_openapi_client/internal/request-options.js +10 -0
- package/dist/_openapi_client/internal/shim-types.cjs +4 -0
- package/dist/_openapi_client/internal/shim-types.d.ts +16 -0
- package/dist/_openapi_client/internal/shim-types.js +3 -0
- package/dist/_openapi_client/internal/shims.cjs +92 -0
- package/dist/_openapi_client/internal/shims.d.ts +25 -0
- package/dist/_openapi_client/internal/shims.js +85 -0
- package/dist/_openapi_client/internal/to-file.cjs +91 -0
- package/dist/_openapi_client/internal/to-file.d.ts +44 -0
- package/dist/_openapi_client/internal/to-file.js +88 -0
- package/dist/_openapi_client/internal/types.cjs +4 -0
- package/dist/_openapi_client/internal/types.d.ts +35 -0
- package/dist/_openapi_client/internal/types.js +3 -0
- package/dist/_openapi_client/internal/uploads.cjs +140 -0
- package/dist/_openapi_client/internal/uploads.d.ts +41 -0
- package/dist/_openapi_client/internal/uploads.js +130 -0
- package/dist/_openapi_client/internal/utils/env.cjs +22 -0
- package/dist/_openapi_client/internal/utils/env.d.ts +8 -0
- package/dist/_openapi_client/internal/utils/env.js +18 -0
- package/dist/_openapi_client/internal/utils/log.cjs +88 -0
- package/dist/_openapi_client/internal/utils/log.d.ts +36 -0
- package/dist/_openapi_client/internal/utils/log.js +82 -0
- package/dist/_openapi_client/internal/utils/path.cjs +79 -0
- package/dist/_openapi_client/internal/utils/path.d.ts +14 -0
- package/dist/_openapi_client/internal/utils/path.js +74 -0
- package/dist/_openapi_client/internal/utils/query.cjs +42 -0
- package/dist/_openapi_client/internal/utils/query.d.ts +1 -0
- package/dist/_openapi_client/internal/utils/query.js +6 -0
- package/dist/_openapi_client/internal/utils/sleep.cjs +7 -0
- package/dist/_openapi_client/internal/utils/sleep.d.ts +1 -0
- package/dist/_openapi_client/internal/utils/sleep.js +3 -0
- package/dist/_openapi_client/internal/utils/uuid.cjs +19 -0
- package/dist/_openapi_client/internal/utils/uuid.d.ts +4 -0
- package/dist/_openapi_client/internal/utils/uuid.js +15 -0
- package/dist/_openapi_client/internal/utils/values.cjs +112 -0
- package/dist/_openapi_client/internal/utils/values.d.ts +17 -0
- package/dist/_openapi_client/internal/utils/values.js +94 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +138 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +367 -0
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +101 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.cjs +46 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +128 -0
- package/dist/_openapi_client/resources/annotation-queues/runs.js +42 -0
- package/dist/_openapi_client/resources/commits.cjs +44 -0
- package/dist/_openapi_client/resources/commits.d.ts +204 -0
- package/dist/_openapi_client/resources/commits.js +40 -0
- package/dist/_openapi_client/resources/datasets/comparative.cjs +22 -0
- package/dist/_openapi_client/resources/datasets/comparative.d.ts +55 -0
- package/dist/_openapi_client/resources/datasets/comparative.js +18 -0
- package/dist/_openapi_client/resources/datasets/datasets.cjs +193 -0
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +374 -0
- package/dist/_openapi_client/resources/datasets/datasets.js +156 -0
- package/dist/_openapi_client/resources/datasets/experiments.cjs +16 -0
- package/dist/_openapi_client/resources/datasets/experiments.d.ts +23 -0
- package/dist/_openapi_client/resources/datasets/experiments.js +12 -0
- package/dist/_openapi_client/resources/datasets/group.cjs +17 -0
- package/dist/_openapi_client/resources/datasets/group.d.ts +160 -0
- package/dist/_openapi_client/resources/datasets/group.js +13 -0
- package/dist/_openapi_client/resources/datasets/runs.cjs +29 -0
- package/dist/_openapi_client/resources/datasets/runs.d.ts +216 -0
- package/dist/_openapi_client/resources/datasets/runs.js +25 -0
- package/dist/_openapi_client/resources/datasets/share.cjs +32 -0
- package/dist/_openapi_client/resources/datasets/share.d.ts +28 -0
- package/dist/_openapi_client/resources/datasets/share.js +28 -0
- package/dist/_openapi_client/resources/datasets/splits.cjs +22 -0
- package/dist/_openapi_client/resources/datasets/splits.d.ts +30 -0
- package/dist/_openapi_client/resources/datasets/splits.js +18 -0
- package/dist/_openapi_client/resources/datasets/versions.cjs +23 -0
- package/dist/_openapi_client/resources/datasets/versions.d.ts +36 -0
- package/dist/_openapi_client/resources/datasets/versions.js +19 -0
- package/dist/_openapi_client/resources/evaluators.cjs +15 -0
- package/dist/_openapi_client/resources/evaluators.d.ts +125 -0
- package/dist/_openapi_client/resources/evaluators.js +11 -0
- package/dist/_openapi_client/resources/examples/bulk.cjs +24 -0
- package/dist/_openapi_client/resources/examples/bulk.d.ts +78 -0
- package/dist/_openapi_client/resources/examples/bulk.js +20 -0
- package/dist/_openapi_client/resources/examples/examples.cjs +124 -0
- package/dist/_openapi_client/resources/examples/examples.d.ts +182 -0
- package/dist/_openapi_client/resources/examples/examples.js +87 -0
- package/dist/_openapi_client/resources/examples/validate.cjs +21 -0
- package/dist/_openapi_client/resources/examples/validate.d.ts +38 -0
- package/dist/_openapi_client/resources/examples/validate.js +17 -0
- package/dist/_openapi_client/resources/feedback/configs.cjs +24 -0
- package/dist/_openapi_client/resources/feedback/configs.d.ts +18 -0
- package/dist/_openapi_client/resources/feedback/configs.js +20 -0
- package/dist/_openapi_client/resources/feedback/feedback.cjs +98 -0
- package/dist/_openapi_client/resources/feedback/feedback.d.ts +275 -0
- package/dist/_openapi_client/resources/feedback/feedback.js +61 -0
- package/dist/_openapi_client/resources/feedback/tokens.cjs +35 -0
- package/dist/_openapi_client/resources/feedback/tokens.d.ts +130 -0
- package/dist/_openapi_client/resources/feedback/tokens.js +31 -0
- package/dist/_openapi_client/resources/index.cjs +35 -0
- package/dist/_openapi_client/resources/index.d.ts +15 -0
- package/dist/_openapi_client/resources/index.js +17 -0
- package/dist/_openapi_client/resources/info.cjs +15 -0
- package/dist/_openapi_client/resources/info.d.ts +51 -0
- package/dist/_openapi_client/resources/info.js +11 -0
- package/dist/_openapi_client/resources/online-evaluators.cjs +70 -0
- package/dist/_openapi_client/resources/online-evaluators.d.ts +284 -0
- package/dist/_openapi_client/resources/online-evaluators.js +66 -0
- package/dist/_openapi_client/resources/public/datasets.cjs +47 -0
- package/dist/_openapi_client/resources/public/datasets.d.ts +152 -0
- package/dist/_openapi_client/resources/public/datasets.js +43 -0
- package/dist/_openapi_client/resources/public/public.cjs +62 -0
- package/dist/_openapi_client/resources/public/public.d.ts +32 -0
- package/dist/_openapi_client/resources/public/public.js +25 -0
- package/dist/_openapi_client/resources/repos/directories.cjs +40 -0
- package/dist/_openapi_client/resources/repos/directories.d.ts +72 -0
- package/dist/_openapi_client/resources/repos/directories.js +36 -0
- package/dist/_openapi_client/resources/repos/repos.cjs +93 -0
- package/dist/_openapi_client/resources/repos/repos.d.ts +188 -0
- package/dist/_openapi_client/resources/repos/repos.js +56 -0
- package/dist/_openapi_client/resources/runs/rules.cjs +9 -0
- package/dist/_openapi_client/resources/runs/rules.d.ts +3 -0
- package/dist/_openapi_client/resources/runs/rules.js +5 -0
- package/dist/_openapi_client/resources/runs/runs.cjs +102 -0
- package/dist/_openapi_client/resources/runs/runs.d.ts +542 -0
- package/dist/_openapi_client/resources/runs/runs.js +65 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +86 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +1121 -0
- package/dist/_openapi_client/resources/sandboxes/boxes.js +82 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +63 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +13 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +26 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +39 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +130 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +35 -0
- package/dist/_openapi_client/resources/sessions/insights.cjs +54 -0
- package/dist/_openapi_client/resources/sessions/insights.d.ts +246 -0
- package/dist/_openapi_client/resources/sessions/insights.js +50 -0
- package/dist/_openapi_client/resources/sessions/sessions.cjs +109 -0
- package/dist/_openapi_client/resources/sessions/sessions.d.ts +674 -0
- package/dist/_openapi_client/resources/sessions/sessions.js +72 -0
- package/dist/_openapi_client/resources/settings.cjs +15 -0
- package/dist/_openapi_client/resources/settings.d.ts +18 -0
- package/dist/_openapi_client/resources/settings.js +11 -0
- package/dist/_openapi_client/resources/workspaces.cjs +35 -0
- package/dist/_openapi_client/resources/workspaces.d.ts +84 -0
- package/dist/_openapi_client/resources/workspaces.js +31 -0
- package/dist/_openapi_client/version.cjs +5 -0
- package/dist/_openapi_client/version.d.ts +1 -0
- package/dist/_openapi_client/version.js +2 -0
- package/dist/client.cjs +48 -19
- package/dist/client.d.ts +5 -0
- package/dist/client.js +29 -0
- package/dist/env.cjs +3 -3
- package/dist/env.d.ts +1 -1
- package/dist/env.js +1 -1
- package/dist/experimental/otel/exporter.cjs +1 -1
- package/dist/experimental/otel/exporter.js +2 -2
- package/dist/experimental/vercel/telemetry.cjs +1 -1
- package/dist/experimental/vercel/telemetry.js +2 -2
- package/dist/index.cjs +4 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/run_trees.cjs +1 -1
- package/dist/run_trees.js +2 -2
- package/dist/sandbox/client.cjs +11 -3
- package/dist/sandbox/client.js +11 -3
- package/dist/sandbox/index.cjs +8 -2
- package/dist/sandbox/index.d.ts +3 -2
- package/dist/sandbox/index.js +2 -1
- package/dist/sandbox/mounts.cjs +114 -0
- package/dist/sandbox/mounts.d.ts +24 -0
- package/dist/sandbox/mounts.js +109 -0
- package/dist/sandbox/proxy_config.cjs +90 -5
- package/dist/sandbox/proxy_config.d.ts +19 -4
- package/dist/sandbox/proxy_config.js +86 -4
- package/dist/sandbox/types.d.ts +92 -3
- package/dist/traceable.cjs +1 -1
- package/dist/traceable.js +2 -2
- package/dist/utils/guard.cjs +13 -0
- package/dist/utils/guard.d.ts +6 -0
- package/dist/utils/guard.js +10 -0
- package/dist/utils/jestlike/globals.cjs +1 -1
- package/dist/utils/jestlike/globals.js +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as RunsAPI from './runs.js';
|
|
3
|
+
import { RunCreateParams, RunCreateResponse, RunDeleteAllParams, RunDeleteAllResponse, RunDeleteQueueParams, RunDeleteQueueResponse, RunListParams, RunListResponse, RunUpdateParams, RunUpdateResponse, Runs } from './runs.js';
|
|
4
|
+
import * as DatasetsAPI from '../datasets/datasets.js';
|
|
5
|
+
import { APIPromise } from '../../core/api-promise.js';
|
|
6
|
+
import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
|
|
7
|
+
import { RequestOptions } from '../../internal/request-options.js';
|
|
8
|
+
import * as RunsAPI_ from '../runs/runs.js';
|
|
9
|
+
export declare class AnnotationQueues extends APIResource {
|
|
10
|
+
runs: RunsAPI.Runs;
|
|
11
|
+
/**
|
|
12
|
+
* Get Annotation Queue
|
|
13
|
+
*/
|
|
14
|
+
retrieve(queueID: string, options?: RequestOptions): APIPromise<AnnotationQueueRetrieveResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Update Annotation Queue
|
|
17
|
+
*/
|
|
18
|
+
update(queueID: string, body: AnnotationQueueUpdateParams, options?: RequestOptions): APIPromise<unknown>;
|
|
19
|
+
/**
|
|
20
|
+
* Delete Annotation Queue
|
|
21
|
+
*/
|
|
22
|
+
delete(queueID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
23
|
+
/**
|
|
24
|
+
* Create Annotation Queue
|
|
25
|
+
*/
|
|
26
|
+
annotationQueues(body: AnnotationQueueAnnotationQueuesParams, options?: RequestOptions): APIPromise<AnnotationQueueSchema>;
|
|
27
|
+
/**
|
|
28
|
+
* Create Identity Annotation Queue Run Status
|
|
29
|
+
*/
|
|
30
|
+
createRunStatus(annotationQueueRunID: string, body: AnnotationQueueCreateRunStatusParams, options?: RequestOptions): APIPromise<unknown>;
|
|
31
|
+
/**
|
|
32
|
+
* Export Annotation Queue Archived Runs
|
|
33
|
+
*/
|
|
34
|
+
export(queueID: string, body: AnnotationQueueExportParams, options?: RequestOptions): APIPromise<unknown>;
|
|
35
|
+
/**
|
|
36
|
+
* Populate annotation queue with runs from an experiment.
|
|
37
|
+
*/
|
|
38
|
+
populate(body: AnnotationQueuePopulateParams, options?: RequestOptions): APIPromise<unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* Get Annotation Queues
|
|
41
|
+
*/
|
|
42
|
+
retrieveAnnotationQueues(query?: AnnotationQueueRetrieveAnnotationQueuesParams | null | undefined, options?: RequestOptions): PagePromise<AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, AnnotationQueueRetrieveAnnotationQueuesResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Get Annotation Queues For Run
|
|
45
|
+
*/
|
|
46
|
+
retrieveQueues(runID: string, options?: RequestOptions): APIPromise<AnnotationQueueRetrieveQueuesResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Get a run from an annotation queue
|
|
49
|
+
*/
|
|
50
|
+
retrieveRun(index: number, params: AnnotationQueueRetrieveRunParams, options?: RequestOptions): APIPromise<RunSchemaWithAnnotationQueueInfo>;
|
|
51
|
+
/**
|
|
52
|
+
* Get Size From Annotation Queue
|
|
53
|
+
*/
|
|
54
|
+
retrieveSize(queueID: string, query?: AnnotationQueueRetrieveSizeParams | null | undefined, options?: RequestOptions): APIPromise<AnnotationQueueSizeSchema>;
|
|
55
|
+
/**
|
|
56
|
+
* Get Total Archived From Annotation Queue
|
|
57
|
+
*/
|
|
58
|
+
retrieveTotalArchived(queueID: string, query?: AnnotationQueueRetrieveTotalArchivedParams | null | undefined, options?: RequestOptions): APIPromise<AnnotationQueueSizeSchema>;
|
|
59
|
+
/**
|
|
60
|
+
* Get Total Size From Annotation Queue
|
|
61
|
+
*/
|
|
62
|
+
retrieveTotalSize(queueID: string, options?: RequestOptions): APIPromise<AnnotationQueueSizeSchema>;
|
|
63
|
+
}
|
|
64
|
+
export type AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<AnnotationQueueRetrieveAnnotationQueuesResponse>;
|
|
65
|
+
export interface AnnotationQueueRubricItemSchema {
|
|
66
|
+
feedback_key: string;
|
|
67
|
+
description?: string | null;
|
|
68
|
+
is_assertion?: boolean | null;
|
|
69
|
+
is_required?: boolean | null;
|
|
70
|
+
score_descriptions?: {
|
|
71
|
+
[key: string]: string;
|
|
72
|
+
} | null;
|
|
73
|
+
value_descriptions?: {
|
|
74
|
+
[key: string]: string;
|
|
75
|
+
} | null;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* AnnotationQueue schema.
|
|
79
|
+
*/
|
|
80
|
+
export interface AnnotationQueueSchema {
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
queue_type: 'single' | 'pairwise';
|
|
84
|
+
tenant_id: string;
|
|
85
|
+
assigned_reviewers?: Array<AnnotationQueueSchema.AssignedReviewer>;
|
|
86
|
+
created_at?: string;
|
|
87
|
+
default_dataset?: string | null;
|
|
88
|
+
description?: string | null;
|
|
89
|
+
enable_reservations?: boolean | null;
|
|
90
|
+
metadata?: {
|
|
91
|
+
[key: string]: unknown;
|
|
92
|
+
} | null;
|
|
93
|
+
num_reviewers_per_item?: number | null;
|
|
94
|
+
reservation_minutes?: number | null;
|
|
95
|
+
reviewer_access_mode?: string;
|
|
96
|
+
run_rule_id?: string | null;
|
|
97
|
+
source_rule_id?: string | null;
|
|
98
|
+
updated_at?: string;
|
|
99
|
+
}
|
|
100
|
+
export declare namespace AnnotationQueueSchema {
|
|
101
|
+
/**
|
|
102
|
+
* Identity info for an assigned reviewer on an annotation queue.
|
|
103
|
+
*/
|
|
104
|
+
interface AssignedReviewer {
|
|
105
|
+
id: string;
|
|
106
|
+
email?: string | null;
|
|
107
|
+
name?: string | null;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Size of an Annotation Queue
|
|
112
|
+
*/
|
|
113
|
+
export interface AnnotationQueueSizeSchema {
|
|
114
|
+
size: number;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Run schema with annotation queue info.
|
|
118
|
+
*/
|
|
119
|
+
export interface RunSchemaWithAnnotationQueueInfo {
|
|
120
|
+
id: string;
|
|
121
|
+
app_path: string;
|
|
122
|
+
dotted_order: string;
|
|
123
|
+
name: string;
|
|
124
|
+
queue_run_id: string;
|
|
125
|
+
/**
|
|
126
|
+
* Enum for run types.
|
|
127
|
+
*/
|
|
128
|
+
run_type: RunsAPI_.RunTypeEnum;
|
|
129
|
+
session_id: string;
|
|
130
|
+
status: string;
|
|
131
|
+
trace_id: string;
|
|
132
|
+
added_at?: string | null;
|
|
133
|
+
child_run_ids?: Array<string> | null;
|
|
134
|
+
completed_by?: Array<string>;
|
|
135
|
+
completion_cost?: string | null;
|
|
136
|
+
completion_cost_details?: {
|
|
137
|
+
[key: string]: string;
|
|
138
|
+
} | null;
|
|
139
|
+
completion_token_details?: {
|
|
140
|
+
[key: string]: number;
|
|
141
|
+
} | null;
|
|
142
|
+
completion_tokens?: number;
|
|
143
|
+
direct_child_run_ids?: Array<string> | null;
|
|
144
|
+
effective_added_at?: string | null;
|
|
145
|
+
end_time?: string | null;
|
|
146
|
+
error?: string | null;
|
|
147
|
+
events?: Array<{
|
|
148
|
+
[key: string]: unknown;
|
|
149
|
+
}> | null;
|
|
150
|
+
execution_order?: number;
|
|
151
|
+
extra?: {
|
|
152
|
+
[key: string]: unknown;
|
|
153
|
+
} | null;
|
|
154
|
+
feedback_stats?: {
|
|
155
|
+
[key: string]: {
|
|
156
|
+
[key: string]: unknown;
|
|
157
|
+
};
|
|
158
|
+
} | null;
|
|
159
|
+
first_token_time?: string | null;
|
|
160
|
+
in_dataset?: boolean | null;
|
|
161
|
+
inputs?: {
|
|
162
|
+
[key: string]: unknown;
|
|
163
|
+
} | null;
|
|
164
|
+
inputs_preview?: string | null;
|
|
165
|
+
inputs_s3_urls?: {
|
|
166
|
+
[key: string]: unknown;
|
|
167
|
+
} | null;
|
|
168
|
+
last_queued_at?: string | null;
|
|
169
|
+
last_reviewed_time?: string | null;
|
|
170
|
+
manifest_id?: string | null;
|
|
171
|
+
manifest_s3_id?: string | null;
|
|
172
|
+
messages?: Array<{
|
|
173
|
+
[key: string]: unknown;
|
|
174
|
+
}> | null;
|
|
175
|
+
outputs?: {
|
|
176
|
+
[key: string]: unknown;
|
|
177
|
+
} | null;
|
|
178
|
+
outputs_preview?: string | null;
|
|
179
|
+
outputs_s3_urls?: {
|
|
180
|
+
[key: string]: unknown;
|
|
181
|
+
} | null;
|
|
182
|
+
parent_run_id?: string | null;
|
|
183
|
+
parent_run_ids?: Array<string> | null;
|
|
184
|
+
price_model_id?: string | null;
|
|
185
|
+
prompt_cost?: string | null;
|
|
186
|
+
prompt_cost_details?: {
|
|
187
|
+
[key: string]: string;
|
|
188
|
+
} | null;
|
|
189
|
+
prompt_token_details?: {
|
|
190
|
+
[key: string]: number;
|
|
191
|
+
} | null;
|
|
192
|
+
prompt_tokens?: number;
|
|
193
|
+
reference_dataset_id?: string | null;
|
|
194
|
+
reference_example_id?: string | null;
|
|
195
|
+
reserved_by?: Array<string>;
|
|
196
|
+
s3_urls?: {
|
|
197
|
+
[key: string]: unknown;
|
|
198
|
+
} | null;
|
|
199
|
+
serialized?: {
|
|
200
|
+
[key: string]: unknown;
|
|
201
|
+
} | null;
|
|
202
|
+
share_token?: string | null;
|
|
203
|
+
source_proposed_example_id?: string | null;
|
|
204
|
+
start_time?: string;
|
|
205
|
+
tags?: Array<string> | null;
|
|
206
|
+
thread_id?: string | null;
|
|
207
|
+
total_cost?: string | null;
|
|
208
|
+
total_tokens?: number;
|
|
209
|
+
trace_first_received_at?: string | null;
|
|
210
|
+
trace_max_start_time?: string | null;
|
|
211
|
+
trace_min_start_time?: string | null;
|
|
212
|
+
trace_tier?: 'longlived' | 'shortlived' | null;
|
|
213
|
+
trace_upgrade?: boolean;
|
|
214
|
+
ttl_seconds?: number | null;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* AnnotationQueue schema with rubric.
|
|
218
|
+
*/
|
|
219
|
+
export interface AnnotationQueueRetrieveResponse {
|
|
220
|
+
id: string;
|
|
221
|
+
name: string;
|
|
222
|
+
queue_type: 'single' | 'pairwise';
|
|
223
|
+
tenant_id: string;
|
|
224
|
+
assigned_reviewers?: Array<AnnotationQueueRetrieveResponse.AssignedReviewer>;
|
|
225
|
+
created_at?: string;
|
|
226
|
+
default_dataset?: string | null;
|
|
227
|
+
description?: string | null;
|
|
228
|
+
enable_reservations?: boolean | null;
|
|
229
|
+
metadata?: {
|
|
230
|
+
[key: string]: unknown;
|
|
231
|
+
} | null;
|
|
232
|
+
num_reviewers_per_item?: number | null;
|
|
233
|
+
reservation_minutes?: number | null;
|
|
234
|
+
reviewer_access_mode?: string;
|
|
235
|
+
rubric_instructions?: string | null;
|
|
236
|
+
rubric_items?: Array<AnnotationQueueRubricItemSchema> | null;
|
|
237
|
+
run_rule_id?: string | null;
|
|
238
|
+
source_rule_id?: string | null;
|
|
239
|
+
updated_at?: string;
|
|
240
|
+
}
|
|
241
|
+
export declare namespace AnnotationQueueRetrieveResponse {
|
|
242
|
+
/**
|
|
243
|
+
* Identity info for an assigned reviewer on an annotation queue.
|
|
244
|
+
*/
|
|
245
|
+
interface AssignedReviewer {
|
|
246
|
+
id: string;
|
|
247
|
+
email?: string | null;
|
|
248
|
+
name?: string | null;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
export type AnnotationQueueUpdateResponse = unknown;
|
|
252
|
+
export type AnnotationQueueDeleteResponse = unknown;
|
|
253
|
+
export type AnnotationQueueCreateRunStatusResponse = unknown;
|
|
254
|
+
export type AnnotationQueueExportResponse = unknown;
|
|
255
|
+
export type AnnotationQueuePopulateResponse = unknown;
|
|
256
|
+
/**
|
|
257
|
+
* AnnotationQueue schema with size.
|
|
258
|
+
*/
|
|
259
|
+
export interface AnnotationQueueRetrieveAnnotationQueuesResponse {
|
|
260
|
+
id: string;
|
|
261
|
+
name: string;
|
|
262
|
+
queue_type: 'single' | 'pairwise';
|
|
263
|
+
tenant_id: string;
|
|
264
|
+
total_runs: number;
|
|
265
|
+
assigned_reviewers?: Array<AnnotationQueueRetrieveAnnotationQueuesResponse.AssignedReviewer>;
|
|
266
|
+
created_at?: string;
|
|
267
|
+
default_dataset?: string | null;
|
|
268
|
+
description?: string | null;
|
|
269
|
+
enable_reservations?: boolean | null;
|
|
270
|
+
metadata?: {
|
|
271
|
+
[key: string]: unknown;
|
|
272
|
+
} | null;
|
|
273
|
+
num_reviewers_per_item?: number | null;
|
|
274
|
+
reservation_minutes?: number | null;
|
|
275
|
+
reviewer_access_mode?: string;
|
|
276
|
+
run_rule_id?: string | null;
|
|
277
|
+
source_rule_id?: string | null;
|
|
278
|
+
updated_at?: string;
|
|
279
|
+
}
|
|
280
|
+
export declare namespace AnnotationQueueRetrieveAnnotationQueuesResponse {
|
|
281
|
+
/**
|
|
282
|
+
* Identity info for an assigned reviewer on an annotation queue.
|
|
283
|
+
*/
|
|
284
|
+
interface AssignedReviewer {
|
|
285
|
+
id: string;
|
|
286
|
+
email?: string | null;
|
|
287
|
+
name?: string | null;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
export type AnnotationQueueRetrieveQueuesResponse = Array<AnnotationQueueSchema>;
|
|
291
|
+
export interface AnnotationQueueUpdateParams {
|
|
292
|
+
default_dataset?: string | null;
|
|
293
|
+
description?: string | null;
|
|
294
|
+
enable_reservations?: boolean;
|
|
295
|
+
metadata?: {
|
|
296
|
+
[key: string]: unknown;
|
|
297
|
+
} | DatasetsAPI.Missing | null;
|
|
298
|
+
name?: string | null;
|
|
299
|
+
num_reviewers_per_item?: number | DatasetsAPI.Missing | null;
|
|
300
|
+
reservation_minutes?: number | null;
|
|
301
|
+
reviewer_access_mode?: 'any' | 'assigned' | null;
|
|
302
|
+
rubric_instructions?: string | null;
|
|
303
|
+
rubric_items?: Array<AnnotationQueueRubricItemSchema> | null;
|
|
304
|
+
}
|
|
305
|
+
export interface AnnotationQueueAnnotationQueuesParams {
|
|
306
|
+
name: string;
|
|
307
|
+
id?: string;
|
|
308
|
+
created_at?: string;
|
|
309
|
+
default_dataset?: string | null;
|
|
310
|
+
description?: string | null;
|
|
311
|
+
enable_reservations?: boolean | null;
|
|
312
|
+
metadata?: {
|
|
313
|
+
[key: string]: unknown;
|
|
314
|
+
} | null;
|
|
315
|
+
num_reviewers_per_item?: number | null;
|
|
316
|
+
reservation_minutes?: number | null;
|
|
317
|
+
reviewer_access_mode?: string;
|
|
318
|
+
rubric_instructions?: string | null;
|
|
319
|
+
rubric_items?: Array<AnnotationQueueRubricItemSchema> | null;
|
|
320
|
+
session_ids?: Array<string> | null;
|
|
321
|
+
updated_at?: string;
|
|
322
|
+
}
|
|
323
|
+
export interface AnnotationQueueCreateRunStatusParams {
|
|
324
|
+
override_added_at?: string | null;
|
|
325
|
+
status?: string | null;
|
|
326
|
+
}
|
|
327
|
+
export interface AnnotationQueueExportParams {
|
|
328
|
+
end_time?: string | null;
|
|
329
|
+
include_annotator_detail?: boolean;
|
|
330
|
+
start_time?: string | null;
|
|
331
|
+
}
|
|
332
|
+
export interface AnnotationQueuePopulateParams {
|
|
333
|
+
queue_id: string;
|
|
334
|
+
session_ids: Array<string>;
|
|
335
|
+
}
|
|
336
|
+
export interface AnnotationQueueRetrieveAnnotationQueuesParams extends OffsetPaginationTopLevelArrayParams {
|
|
337
|
+
assigned_to_me?: boolean;
|
|
338
|
+
dataset_id?: string | null;
|
|
339
|
+
ids?: Array<string> | null;
|
|
340
|
+
name?: string | null;
|
|
341
|
+
name_contains?: string | null;
|
|
342
|
+
queue_type?: 'single' | 'pairwise' | null;
|
|
343
|
+
sort_by?: string | null;
|
|
344
|
+
sort_by_desc?: boolean;
|
|
345
|
+
tag_value_id?: Array<string> | null;
|
|
346
|
+
}
|
|
347
|
+
export interface AnnotationQueueRetrieveRunParams {
|
|
348
|
+
/**
|
|
349
|
+
* Path param
|
|
350
|
+
*/
|
|
351
|
+
queue_id: string;
|
|
352
|
+
/**
|
|
353
|
+
* Query param
|
|
354
|
+
*/
|
|
355
|
+
include_extra?: boolean;
|
|
356
|
+
}
|
|
357
|
+
export interface AnnotationQueueRetrieveSizeParams {
|
|
358
|
+
status?: 'needs_my_review' | 'needs_others_review' | 'completed' | null;
|
|
359
|
+
}
|
|
360
|
+
export interface AnnotationQueueRetrieveTotalArchivedParams {
|
|
361
|
+
end_time?: string | null;
|
|
362
|
+
start_time?: string | null;
|
|
363
|
+
}
|
|
364
|
+
export declare namespace AnnotationQueues {
|
|
365
|
+
export { type AnnotationQueueRubricItemSchema as AnnotationQueueRubricItemSchema, type AnnotationQueueSchema as AnnotationQueueSchema, type AnnotationQueueSizeSchema as AnnotationQueueSizeSchema, type RunSchemaWithAnnotationQueueInfo as RunSchemaWithAnnotationQueueInfo, type AnnotationQueueRetrieveResponse as AnnotationQueueRetrieveResponse, type AnnotationQueueUpdateResponse as AnnotationQueueUpdateResponse, type AnnotationQueueDeleteResponse as AnnotationQueueDeleteResponse, type AnnotationQueueCreateRunStatusResponse as AnnotationQueueCreateRunStatusResponse, type AnnotationQueueExportResponse as AnnotationQueueExportResponse, type AnnotationQueuePopulateResponse as AnnotationQueuePopulateResponse, type AnnotationQueueRetrieveAnnotationQueuesResponse as AnnotationQueueRetrieveAnnotationQueuesResponse, type AnnotationQueueRetrieveQueuesResponse as AnnotationQueueRetrieveQueuesResponse, type AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray as AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, type AnnotationQueueUpdateParams as AnnotationQueueUpdateParams, type AnnotationQueueAnnotationQueuesParams as AnnotationQueueAnnotationQueuesParams, type AnnotationQueueCreateRunStatusParams as AnnotationQueueCreateRunStatusParams, type AnnotationQueueExportParams as AnnotationQueueExportParams, type AnnotationQueuePopulateParams as AnnotationQueuePopulateParams, type AnnotationQueueRetrieveAnnotationQueuesParams as AnnotationQueueRetrieveAnnotationQueuesParams, type AnnotationQueueRetrieveRunParams as AnnotationQueueRetrieveRunParams, type AnnotationQueueRetrieveSizeParams as AnnotationQueueRetrieveSizeParams, type AnnotationQueueRetrieveTotalArchivedParams as AnnotationQueueRetrieveTotalArchivedParams, };
|
|
366
|
+
export { Runs as Runs, type RunCreateResponse as RunCreateResponse, type RunUpdateResponse as RunUpdateResponse, type RunListResponse as RunListResponse, type RunDeleteAllResponse as RunDeleteAllResponse, type RunDeleteQueueResponse as RunDeleteQueueResponse, type RunCreateParams as RunCreateParams, type RunUpdateParams as RunUpdateParams, type RunListParams as RunListParams, type RunDeleteAllParams as RunDeleteAllParams, type RunDeleteQueueParams as RunDeleteQueueParams, };
|
|
367
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
import { APIResource } from '../../core/resource.js';
|
|
4
|
+
import * as RunsAPI from './runs.js';
|
|
5
|
+
import { Runs, } from './runs.js';
|
|
6
|
+
import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
|
|
7
|
+
import { path } from '../../internal/utils/path.js';
|
|
8
|
+
export class AnnotationQueues extends APIResource {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
Object.defineProperty(this, "runs", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: new RunsAPI.Runs(this._client)
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get Annotation Queue
|
|
20
|
+
*/
|
|
21
|
+
retrieve(queueID, options) {
|
|
22
|
+
return this._client.get(path `/api/v1/annotation-queues/${queueID}`, options);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Update Annotation Queue
|
|
26
|
+
*/
|
|
27
|
+
update(queueID, body, options) {
|
|
28
|
+
return this._client.patch(path `/api/v1/annotation-queues/${queueID}`, { body, ...options });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Delete Annotation Queue
|
|
32
|
+
*/
|
|
33
|
+
delete(queueID, options) {
|
|
34
|
+
return this._client.delete(path `/api/v1/annotation-queues/${queueID}`, options);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Create Annotation Queue
|
|
38
|
+
*/
|
|
39
|
+
annotationQueues(body, options) {
|
|
40
|
+
return this._client.post('/api/v1/annotation-queues', { body, ...options });
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create Identity Annotation Queue Run Status
|
|
44
|
+
*/
|
|
45
|
+
createRunStatus(annotationQueueRunID, body, options) {
|
|
46
|
+
return this._client.post(path `/api/v1/annotation-queues/status/${annotationQueueRunID}`, {
|
|
47
|
+
body,
|
|
48
|
+
...options,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Export Annotation Queue Archived Runs
|
|
53
|
+
*/
|
|
54
|
+
export(queueID, body, options) {
|
|
55
|
+
return this._client.post(path `/api/v1/annotation-queues/${queueID}/export`, { body, ...options });
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Populate annotation queue with runs from an experiment.
|
|
59
|
+
*/
|
|
60
|
+
populate(body, options) {
|
|
61
|
+
return this._client.post('/api/v1/annotation-queues/populate', { body, ...options });
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get Annotation Queues
|
|
65
|
+
*/
|
|
66
|
+
retrieveAnnotationQueues(query = {}, options) {
|
|
67
|
+
return this._client.getAPIList('/api/v1/annotation-queues', (OffsetPaginationTopLevelArray), { query, ...options });
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get Annotation Queues For Run
|
|
71
|
+
*/
|
|
72
|
+
retrieveQueues(runID, options) {
|
|
73
|
+
return this._client.get(path `/api/v1/annotation-queues/${runID}/queues`, options);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Get a run from an annotation queue
|
|
77
|
+
*/
|
|
78
|
+
retrieveRun(index, params, options) {
|
|
79
|
+
const { queue_id, ...query } = params;
|
|
80
|
+
return this._client.get(path `/api/v1/annotation-queues/${queue_id}/run/${index}`, { query, ...options });
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get Size From Annotation Queue
|
|
84
|
+
*/
|
|
85
|
+
retrieveSize(queueID, query = {}, options) {
|
|
86
|
+
return this._client.get(path `/api/v1/annotation-queues/${queueID}/size`, { query, ...options });
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Get Total Archived From Annotation Queue
|
|
90
|
+
*/
|
|
91
|
+
retrieveTotalArchived(queueID, query = {}, options) {
|
|
92
|
+
return this._client.get(path `/api/v1/annotation-queues/${queueID}/total_archived`, { query, ...options });
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Get Total Size From Annotation Queue
|
|
96
|
+
*/
|
|
97
|
+
retrieveTotalSize(queueID, options) {
|
|
98
|
+
return this._client.get(path `/api/v1/annotation-queues/${queueID}/total_size`, options);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
AnnotationQueues.Runs = Runs;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Runs = void 0;
|
|
6
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
7
|
+
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
8
|
+
class Runs extends resource_js_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Add Runs To Annotation Queue
|
|
11
|
+
*/
|
|
12
|
+
create(queueID, params, options) {
|
|
13
|
+
const { body } = params;
|
|
14
|
+
return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs`, { body: body, ...options });
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Update Run In Annotation Queue
|
|
18
|
+
*/
|
|
19
|
+
update(queueRunID, params, options) {
|
|
20
|
+
const { queue_id, ...body } = params;
|
|
21
|
+
return this._client.patch((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, {
|
|
22
|
+
body,
|
|
23
|
+
...options,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get Runs From Annotation Queue
|
|
28
|
+
*/
|
|
29
|
+
list(queueID, query = {}, options) {
|
|
30
|
+
return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs`, { query, ...options });
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Delete Runs From Annotation Queue
|
|
34
|
+
*/
|
|
35
|
+
deleteAll(queueID, body, options) {
|
|
36
|
+
return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/runs/delete`, { body, ...options });
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Delete Run From Annotation Queue
|
|
40
|
+
*/
|
|
41
|
+
deleteQueue(queueRunID, params, options) {
|
|
42
|
+
const { queue_id } = params;
|
|
43
|
+
return this._client.delete((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, options);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.Runs = Runs;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as AnnotationQueuesAPI from './annotation-queues.js';
|
|
3
|
+
import { APIPromise } from '../../core/api-promise.js';
|
|
4
|
+
import { RequestOptions } from '../../internal/request-options.js';
|
|
5
|
+
export declare class Runs extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Add Runs To Annotation Queue
|
|
8
|
+
*/
|
|
9
|
+
create(queueID: string, params: RunCreateParams, options?: RequestOptions): APIPromise<RunCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Update Run In Annotation Queue
|
|
12
|
+
*/
|
|
13
|
+
update(queueRunID: string, params: RunUpdateParams, options?: RequestOptions): APIPromise<unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Get Runs From Annotation Queue
|
|
16
|
+
*/
|
|
17
|
+
list(queueID: string, query?: RunListParams | null | undefined, options?: RequestOptions): APIPromise<RunListResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Delete Runs From Annotation Queue
|
|
20
|
+
*/
|
|
21
|
+
deleteAll(queueID: string, body: RunDeleteAllParams, options?: RequestOptions): APIPromise<unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* Delete Run From Annotation Queue
|
|
24
|
+
*/
|
|
25
|
+
deleteQueue(queueRunID: string, params: RunDeleteQueueParams, options?: RequestOptions): APIPromise<unknown>;
|
|
26
|
+
}
|
|
27
|
+
export type RunCreateResponse = Array<RunCreateResponse.RunCreateResponseItem>;
|
|
28
|
+
export declare namespace RunCreateResponse {
|
|
29
|
+
interface RunCreateResponseItem {
|
|
30
|
+
id: string;
|
|
31
|
+
queue_id: string;
|
|
32
|
+
run_id: string;
|
|
33
|
+
added_at?: string;
|
|
34
|
+
last_reviewed_time?: string | null;
|
|
35
|
+
source_proposed_example_id?: string | null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export type RunUpdateResponse = unknown;
|
|
39
|
+
export type RunListResponse = Array<AnnotationQueuesAPI.RunSchemaWithAnnotationQueueInfo>;
|
|
40
|
+
export type RunDeleteAllResponse = unknown;
|
|
41
|
+
export type RunDeleteQueueResponse = unknown;
|
|
42
|
+
export type RunCreateParams = RunCreateParams.RunsUuidArray | RunCreateParams.RunsAnnotationQueueRunAddSchemaArray | RunCreateParams.Variant2;
|
|
43
|
+
export declare namespace RunCreateParams {
|
|
44
|
+
interface RunsUuidArray {
|
|
45
|
+
body: Array<string>;
|
|
46
|
+
}
|
|
47
|
+
interface RunsAnnotationQueueRunAddSchemaArray {
|
|
48
|
+
body: Array<RunsAnnotationQueueRunAddSchemaArray.Body>;
|
|
49
|
+
}
|
|
50
|
+
namespace RunsAnnotationQueueRunAddSchemaArray {
|
|
51
|
+
/**
|
|
52
|
+
* Add a single run to AQ (CH path) with an optional back-pointer to the
|
|
53
|
+
* issues-agent proposal that seeded this add. Use when bulk-adding runs that come
|
|
54
|
+
* from different proposals — each row carries its own source_proposed_example_id.
|
|
55
|
+
* For unrelated bulk adds, prefer plain List[UUID] on the same endpoint.
|
|
56
|
+
*/
|
|
57
|
+
interface Body {
|
|
58
|
+
run_id: string;
|
|
59
|
+
source_proposed_example_id?: string | null;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
interface Variant2 {
|
|
63
|
+
body: Array<Variant2.Body>;
|
|
64
|
+
}
|
|
65
|
+
namespace Variant2 {
|
|
66
|
+
/**
|
|
67
|
+
* Deprecated: use plain UUID list or AddRunToQueueByKeyRequest instead.
|
|
68
|
+
*/
|
|
69
|
+
interface Body {
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated
|
|
72
|
+
*/
|
|
73
|
+
run_id: string;
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated
|
|
76
|
+
*/
|
|
77
|
+
parent_run_id?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* @deprecated
|
|
80
|
+
*/
|
|
81
|
+
session_id?: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated
|
|
84
|
+
*/
|
|
85
|
+
start_time?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated
|
|
88
|
+
*/
|
|
89
|
+
trace_id?: string | null;
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated
|
|
92
|
+
*/
|
|
93
|
+
trace_tier?: 'longlived' | 'shortlived' | null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export interface RunUpdateParams {
|
|
98
|
+
/**
|
|
99
|
+
* Path param
|
|
100
|
+
*/
|
|
101
|
+
queue_id: string;
|
|
102
|
+
/**
|
|
103
|
+
* Body param
|
|
104
|
+
*/
|
|
105
|
+
added_at?: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* Body param
|
|
108
|
+
*/
|
|
109
|
+
last_reviewed_time?: string | null;
|
|
110
|
+
}
|
|
111
|
+
export interface RunListParams {
|
|
112
|
+
archived?: boolean | null;
|
|
113
|
+
include_stats?: boolean | null;
|
|
114
|
+
limit?: number;
|
|
115
|
+
offset?: number;
|
|
116
|
+
status?: 'needs_my_review' | 'needs_others_review' | 'completed' | null;
|
|
117
|
+
}
|
|
118
|
+
export interface RunDeleteAllParams {
|
|
119
|
+
delete_all?: boolean;
|
|
120
|
+
exclude_run_ids?: Array<string> | null;
|
|
121
|
+
run_ids?: Array<string> | null;
|
|
122
|
+
}
|
|
123
|
+
export interface RunDeleteQueueParams {
|
|
124
|
+
queue_id: string;
|
|
125
|
+
}
|
|
126
|
+
export declare namespace Runs {
|
|
127
|
+
export { type RunCreateResponse as RunCreateResponse, type RunUpdateResponse as RunUpdateResponse, type RunListResponse as RunListResponse, type RunDeleteAllResponse as RunDeleteAllResponse, type RunDeleteQueueResponse as RunDeleteQueueResponse, type RunCreateParams as RunCreateParams, type RunUpdateParams as RunUpdateParams, type RunListParams as RunListParams, type RunDeleteAllParams as RunDeleteAllParams, type RunDeleteQueueParams as RunDeleteQueueParams, };
|
|
128
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
import { APIResource } from '../../core/resource.js';
|
|
4
|
+
import { path } from '../../internal/utils/path.js';
|
|
5
|
+
export class Runs extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Add Runs To Annotation Queue
|
|
8
|
+
*/
|
|
9
|
+
create(queueID, params, options) {
|
|
10
|
+
const { body } = params;
|
|
11
|
+
return this._client.post(path `/api/v1/annotation-queues/${queueID}/runs`, { body: body, ...options });
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Update Run In Annotation Queue
|
|
15
|
+
*/
|
|
16
|
+
update(queueRunID, params, options) {
|
|
17
|
+
const { queue_id, ...body } = params;
|
|
18
|
+
return this._client.patch(path `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, {
|
|
19
|
+
body,
|
|
20
|
+
...options,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get Runs From Annotation Queue
|
|
25
|
+
*/
|
|
26
|
+
list(queueID, query = {}, options) {
|
|
27
|
+
return this._client.get(path `/api/v1/annotation-queues/${queueID}/runs`, { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Delete Runs From Annotation Queue
|
|
31
|
+
*/
|
|
32
|
+
deleteAll(queueID, body, options) {
|
|
33
|
+
return this._client.post(path `/api/v1/annotation-queues/${queueID}/runs/delete`, { body, ...options });
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Delete Run From Annotation Queue
|
|
37
|
+
*/
|
|
38
|
+
deleteQueue(queueRunID, params, options) {
|
|
39
|
+
const { queue_id } = params;
|
|
40
|
+
return this._client.delete(path `/api/v1/annotation-queues/${queue_id}/runs/${queueRunID}`, options);
|
|
41
|
+
}
|
|
42
|
+
}
|