langsmith 0.10.7 → 0.10.9
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/dist/_openapi_client/client.cjs +26 -2
- package/dist/_openapi_client/client.d.ts +15 -6
- package/dist/_openapi_client/client.js +27 -3
- package/dist/_openapi_client/internal/detect-platform.cjs +1 -1
- package/dist/_openapi_client/internal/detect-platform.js +1 -1
- package/dist/_openapi_client/resources/annotation-queues/items.cjs +13 -6
- package/dist/_openapi_client/resources/annotation-queues/items.d.ts +33 -8
- package/dist/_openapi_client/resources/annotation-queues/items.js +13 -6
- package/dist/_openapi_client/resources/datasets/datasets.cjs +9 -0
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +4 -0
- package/dist/_openapi_client/resources/datasets/datasets.js +9 -0
- package/dist/_openapi_client/resources/datasets/examples.cjs +26 -0
- package/dist/_openapi_client/resources/datasets/examples.d.ts +23 -0
- package/dist/_openapi_client/resources/datasets/examples.js +22 -0
- package/dist/_openapi_client/resources/fleet/fleet.cjs +54 -0
- package/dist/_openapi_client/resources/fleet/fleet.d.ts +9 -0
- package/dist/_openapi_client/resources/fleet/fleet.js +17 -0
- package/dist/_openapi_client/resources/fleet/threads.cjs +18 -0
- package/dist/_openapi_client/resources/fleet/threads.d.ts +19 -0
- package/dist/_openapi_client/resources/fleet/threads.js +14 -0
- package/dist/_openapi_client/resources/index.cjs +8 -2
- package/dist/_openapi_client/resources/index.d.ts +6 -3
- package/dist/_openapi_client/resources/index.js +5 -2
- package/dist/_openapi_client/resources/info.d.ts +6 -0
- package/dist/_openapi_client/resources/issues.cjs +2 -2
- package/dist/_openapi_client/resources/issues.d.ts +188 -4
- package/dist/_openapi_client/resources/issues.js +2 -2
- package/dist/_openapi_client/resources/online-evaluators.cjs +7 -4
- package/dist/_openapi_client/resources/online-evaluators.d.ts +63 -4
- package/dist/_openapi_client/resources/online-evaluators.js +7 -4
- package/dist/_openapi_client/resources/product-feedback.cjs +33 -0
- package/dist/_openapi_client/resources/product-feedback.d.ts +77 -0
- package/dist/_openapi_client/resources/product-feedback.js +29 -0
- package/dist/_openapi_client/resources/runs/runs.d.ts +26 -16
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +44 -4
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +256 -21
- package/dist/_openapi_client/resources/sandboxes/boxes.js +44 -4
- package/dist/_openapi_client/resources/sandboxes/registries.d.ts +10 -2
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +13 -0
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +169 -14
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +13 -0
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +10 -6
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +37 -6
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +10 -6
- package/dist/_openapi_client/resources/sessions.cjs +23 -0
- package/dist/_openapi_client/resources/sessions.d.ts +732 -0
- package/dist/_openapi_client/resources/sessions.js +19 -0
- package/dist/_openapi_client/resources/threads/index.cjs +9 -0
- package/dist/_openapi_client/resources/threads/index.d.ts +2 -0
- package/dist/_openapi_client/resources/threads/index.js +4 -0
- package/dist/_openapi_client/resources/threads/share.cjs +61 -0
- package/dist/_openapi_client/resources/threads/share.d.ts +71 -0
- package/dist/_openapi_client/resources/threads/share.js +57 -0
- package/dist/_openapi_client/resources/threads/threads.cjs +143 -0
- package/dist/_openapi_client/resources/threads/threads.d.ts +973 -0
- package/dist/_openapi_client/resources/threads/threads.js +106 -0
- package/dist/_openapi_client/resources/threads.cjs +15 -67
- package/dist/_openapi_client/resources/threads.d.ts +1 -709
- package/dist/_openapi_client/resources/threads.js +1 -65
- package/dist/_openapi_client/resources/traces.d.ts +7 -1
- package/dist/_openapi_client/version.cjs +1 -1
- package/dist/_openapi_client/version.js +1 -1
- package/dist/address.cjs +176 -99
- package/dist/address.d.ts +63 -8
- package/dist/address.js +170 -90
- package/dist/anonymizer/index.cjs +1 -1
- package/dist/anonymizer/index.js +1 -1
- package/dist/client.cjs +39 -19
- package/dist/client.d.ts +20 -4
- package/dist/client.js +34 -14
- package/dist/experimental/otel/exporter.cjs +21 -4
- package/dist/experimental/otel/exporter.d.ts +4 -2
- package/dist/experimental/otel/exporter.js +21 -4
- package/dist/index.cjs +5 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/run_trees.cjs +26 -43
- package/dist/run_trees.d.ts +4 -4
- package/dist/run_trees.js +23 -40
- package/dist/sandbox/client.cjs +33 -4
- package/dist/sandbox/client.d.ts +4 -0
- package/dist/sandbox/client.js +34 -5
- package/dist/sandbox/command_handle.cjs +8 -0
- package/dist/sandbox/command_handle.js +8 -0
- package/dist/sandbox/sandbox.cjs +7 -0
- package/dist/sandbox/sandbox.js +7 -0
- package/dist/sandbox/service_url.cjs +9 -1
- package/dist/sandbox/service_url.d.ts +2 -1
- package/dist/sandbox/service_url.js +9 -1
- package/dist/sandbox/tracing.cjs +13 -0
- package/dist/sandbox/tracing.d.ts +1 -0
- package/dist/sandbox/tracing.js +10 -0
- package/dist/schemas.d.ts +3 -3
- package/dist/traceable.cjs +5 -4
- package/dist/traceable.js +4 -3
- package/dist/utils/{agent_addressing.cjs → addressing.cjs} +22 -23
- package/dist/utils/{agent_addressing.d.ts → addressing.d.ts} +5 -8
- package/dist/utils/{agent_addressing.js → addressing.js} +23 -23
- package/dist/utils/env.cjs +6 -4
- package/dist/utils/env.js +6 -4
- package/package.json +1 -1
|
@@ -65,13 +65,16 @@ const api_promise_js_1 = require("./core/api-promise.cjs");
|
|
|
65
65
|
const info_js_1 = require("./resources/info.cjs");
|
|
66
66
|
const issues_js_1 = require("./resources/issues.cjs");
|
|
67
67
|
const online_evaluators_js_1 = require("./resources/online-evaluators.cjs");
|
|
68
|
-
const
|
|
68
|
+
const product_feedback_js_1 = require("./resources/product-feedback.cjs");
|
|
69
|
+
const sessions_js_1 = require("./resources/sessions.cjs");
|
|
69
70
|
const traces_js_1 = require("./resources/traces.cjs");
|
|
70
71
|
const annotation_queues_js_1 = require("./resources/annotation-queues/annotation-queues.cjs");
|
|
71
72
|
const datasets_js_1 = require("./resources/datasets/datasets.cjs");
|
|
73
|
+
const fleet_js_1 = require("./resources/fleet/fleet.cjs");
|
|
72
74
|
const public_js_1 = require("./resources/public/public.cjs");
|
|
73
75
|
const runs_js_1 = require("./resources/runs/runs.cjs");
|
|
74
76
|
const sandboxes_js_1 = require("./resources/sandboxes/sandboxes.cjs");
|
|
77
|
+
const threads_js_1 = require("./resources/threads/threads.cjs");
|
|
75
78
|
const headers_js_1 = require("./internal/headers.cjs");
|
|
76
79
|
const env_js_1 = require("./internal/utils/env.cjs");
|
|
77
80
|
const log_js_1 = require("./internal/utils/log.cjs");
|
|
@@ -162,6 +165,24 @@ class Langsmith {
|
|
|
162
165
|
writable: true,
|
|
163
166
|
value: void 0
|
|
164
167
|
});
|
|
168
|
+
Object.defineProperty(this, "productFeedback", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
configurable: true,
|
|
171
|
+
writable: true,
|
|
172
|
+
value: new API.ProductFeedback(this)
|
|
173
|
+
});
|
|
174
|
+
Object.defineProperty(this, "fleet", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
configurable: true,
|
|
177
|
+
writable: true,
|
|
178
|
+
value: new API.Fleet(this)
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(this, "sessions", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
configurable: true,
|
|
183
|
+
writable: true,
|
|
184
|
+
value: new API.Sessions(this)
|
|
185
|
+
});
|
|
165
186
|
Object.defineProperty(this, "datasets", {
|
|
166
187
|
enumerable: true,
|
|
167
188
|
configurable: true,
|
|
@@ -229,7 +250,7 @@ class Langsmith {
|
|
|
229
250
|
baseURL: baseURL || `https://api.smith.langchain.com/`,
|
|
230
251
|
};
|
|
231
252
|
this.baseURL = options.baseURL;
|
|
232
|
-
this.timeout = options.timeout ?? _a.DEFAULT_TIMEOUT
|
|
253
|
+
this.timeout = options.timeout ?? _a.DEFAULT_TIMEOUT /* 1.5 minutes */;
|
|
233
254
|
this.logger = options.logger ?? console;
|
|
234
255
|
const defaultLogLevel = 'warn';
|
|
235
256
|
// Set default logLevel early so that we can log a warning in parseLogLevel.
|
|
@@ -762,6 +783,9 @@ Object.defineProperty(Langsmith, "toFile", {
|
|
|
762
783
|
writable: true,
|
|
763
784
|
value: Uploads.toFile
|
|
764
785
|
});
|
|
786
|
+
Langsmith.ProductFeedback = product_feedback_js_1.ProductFeedback;
|
|
787
|
+
Langsmith.Fleet = fleet_js_1.Fleet;
|
|
788
|
+
Langsmith.Sessions = sessions_js_1.Sessions;
|
|
765
789
|
Langsmith.Datasets = datasets_js_1.Datasets;
|
|
766
790
|
Langsmith.Runs = runs_js_1.Runs;
|
|
767
791
|
Langsmith.Threads = threads_js_1.Threads;
|
|
@@ -9,15 +9,18 @@ import * as Uploads from './core/uploads.js';
|
|
|
9
9
|
import * as API from './resources/index.js';
|
|
10
10
|
import { APIPromise } from './core/api-promise.js';
|
|
11
11
|
import { Info, InfoListResponse } from './resources/info.js';
|
|
12
|
-
import { Issue, IssueListParams, Issues, IssuesOffsetPaginationIssues } from './resources/issues.js';
|
|
12
|
+
import { Issue, IssueListParams, IssueRetrieveParams, Issues, IssuesOffsetPaginationIssues } from './resources/issues.js';
|
|
13
13
|
import { BulkDeleteEvaluatorFailedItem, BulkDeleteEvaluatorsResponse, CreateOnlineCodeEvaluatorRequest, CreateOnlineEvaluatorRequest, CreateOnlineEvaluatorResponse, CreateOnlineLlmEvaluatorRequest, GetOnlineEvaluatorSpendResponse, OnlineCodeEvaluator, OnlineEvaluator, OnlineEvaluatorBulkDeleteParams, OnlineEvaluatorCreateParams, OnlineEvaluatorDeleteParams, OnlineEvaluatorListParams, OnlineEvaluatorRunRule, OnlineEvaluatorSpendDay, OnlineEvaluatorSpendGroup, OnlineEvaluatorSpendParams, OnlineEvaluatorType, OnlineEvaluatorUpdateParams, OnlineEvaluators, OnlineEvaluatorsOffsetPaginationOnlineEvaluators, OnlineLlmEvaluator, OnlineSpendLimit, UpdateOnlineCodeEvaluatorRequest, UpdateOnlineEvaluatorRequest, UpdateOnlineEvaluatorResponse, UpdateOnlineLlmEvaluatorRequest } from './resources/online-evaluators.js';
|
|
14
|
-
import {
|
|
14
|
+
import { ProductFeedback, ProductFeedbackCreateParams, ProductFeedbackCreateResponse, ProductFeedbackRetrieveResponse } from './resources/product-feedback.js';
|
|
15
|
+
import { CustomChartsSection, CustomChartsSectionRequest, RunStatsGroupBy, SessionResolveParams, SessionResolveResponse, SessionSortableColumns, Sessions, TimedeltaInput, TracerSession, TracerSessionWithoutVirtualFields } from './resources/sessions.js';
|
|
15
16
|
import { Trace, TraceAggregates, TraceListRunsParams, TraceListRunsResponse, TraceQueryParams, Traces, TracesItemsCursorPostPagination } from './resources/traces.js';
|
|
16
17
|
import { AnnotationQueueAnnotationQueuesParams, AnnotationQueueCreateRunStatusParams, AnnotationQueueCreateRunStatusResponse, AnnotationQueueDeleteResponse, AnnotationQueueExportParams, AnnotationQueueExportResponse, AnnotationQueuePopulateParams, AnnotationQueuePopulateResponse, AnnotationQueueRetrieveAnnotationQueuesParams, AnnotationQueueRetrieveAnnotationQueuesResponse, AnnotationQueueRetrieveAnnotationQueuesResponsesOffsetPaginationTopLevelArray, AnnotationQueueRetrieveQueuesResponse, AnnotationQueueRetrieveResponse, AnnotationQueueRetrieveRunParams, AnnotationQueueRetrieveSizeParams, AnnotationQueueRetrieveTotalArchivedParams, AnnotationQueueRubricItemSchema, AnnotationQueueSchema, AnnotationQueueSizeSchema, AnnotationQueueUpdateParams, AnnotationQueueUpdateResponse, AnnotationQueues, RunSchemaWithAnnotationQueueInfo } from './resources/annotation-queues/annotation-queues.js';
|
|
17
18
|
import { DataType, Dataset, DatasetTransformation, DatasetVersion, Datasets, FeedbackCreateCoreSchema, Missing, SortByDatasetColumn } from './resources/datasets/datasets.js';
|
|
19
|
+
import { Fleet } from './resources/fleet/fleet.js';
|
|
18
20
|
import { Public } from './resources/public/public.js';
|
|
19
21
|
import { ResponseBodyForRunsGenerateQuery, Run, RunGetURLParams, RunGetURLResponse, RunIngest, RunQueryParams, RunQueryV2Params, RunRetrieveParams, RunRetrieveV2Params, RunSchema, RunSelectField, RunStatsQueryParams, RunType, RunTypeEnum, Runs, RunsFilterDataSourceTypeEnum, RunsItemsCursorPostPagination } from './resources/runs/runs.js';
|
|
20
|
-
import { DownloadURLResponse, SandboxListResponse, SandboxResponse, SandboxStatusResponse, Sandboxes, ServiceURLResponse, SnapshotListResponse, SnapshotResponse } from './resources/sandboxes/sandboxes.js';
|
|
22
|
+
import { DownloadURLResponse, SandboxListResponse, SandboxListUsageCostsParams, SandboxListUsageCostsResponse, SandboxListUsageCostsResponsesItemsCursorGetPagination, SandboxResponse, SandboxStatusResponse, Sandboxes, ServiceURLResponse, SnapshotListResponse, SnapshotResponse } from './resources/sandboxes/sandboxes.js';
|
|
23
|
+
import { Thread, ThreadAggregateStatsParams, ThreadAggregateStatsResponse, ThreadListTracesParams, ThreadQueryParams, ThreadStats, ThreadStatsParams, ThreadTrace, ThreadTracesItemsCursorGetPagination, Threads, ThreadsItemsCursorPostPagination } from './resources/threads/threads.js';
|
|
21
24
|
import { type Fetch } from './internal/builtin-types.js';
|
|
22
25
|
import { HeadersLike, NullableHeaders } from './internal/headers.js';
|
|
23
26
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options.js';
|
|
@@ -190,6 +193,9 @@ export declare class Langsmith {
|
|
|
190
193
|
static PermissionDeniedError: typeof Errors.PermissionDeniedError;
|
|
191
194
|
static UnprocessableEntityError: typeof Errors.UnprocessableEntityError;
|
|
192
195
|
static toFile: typeof Uploads.toFile;
|
|
196
|
+
productFeedback: API.ProductFeedback;
|
|
197
|
+
fleet: API.Fleet;
|
|
198
|
+
sessions: API.Sessions;
|
|
193
199
|
datasets: API.Datasets;
|
|
194
200
|
runs: API.Runs;
|
|
195
201
|
threads: API.Threads;
|
|
@@ -221,14 +227,17 @@ export declare namespace Langsmith {
|
|
|
221
227
|
export { type ItemsCursorPostPaginationParams as ItemsCursorPostPaginationParams, type ItemsCursorPostPaginationResponse as ItemsCursorPostPaginationResponse, };
|
|
222
228
|
export import ItemsCursorGetPagination = Pagination.ItemsCursorGetPagination;
|
|
223
229
|
export { type ItemsCursorGetPaginationParams as ItemsCursorGetPaginationParams, type ItemsCursorGetPaginationResponse as ItemsCursorGetPaginationResponse, };
|
|
230
|
+
export { ProductFeedback as ProductFeedback, type ProductFeedbackCreateResponse as ProductFeedbackCreateResponse, type ProductFeedbackRetrieveResponse as ProductFeedbackRetrieveResponse, type ProductFeedbackCreateParams as ProductFeedbackCreateParams, };
|
|
231
|
+
export { Fleet as Fleet };
|
|
232
|
+
export { Sessions as Sessions, type CustomChartsSection as CustomChartsSection, type CustomChartsSectionRequest as CustomChartsSectionRequest, type RunStatsGroupBy as RunStatsGroupBy, type SessionSortableColumns as SessionSortableColumns, type TimedeltaInput as TimedeltaInput, type TracerSession as TracerSession, type TracerSessionWithoutVirtualFields as TracerSessionWithoutVirtualFields, type SessionResolveResponse as SessionResolveResponse, type SessionResolveParams as SessionResolveParams, };
|
|
224
233
|
export { Datasets as Datasets, type DataType as DataType, type Dataset as Dataset, type DatasetTransformation as DatasetTransformation, type DatasetVersion as DatasetVersion, type FeedbackCreateCoreSchema as FeedbackCreateCoreSchema, type Missing as Missing, type SortByDatasetColumn as SortByDatasetColumn, };
|
|
225
234
|
export { Runs as Runs, type ResponseBodyForRunsGenerateQuery as ResponseBodyForRunsGenerateQuery, type Run as Run, type RunIngest as RunIngest, type RunSchema as RunSchema, type RunSelectField as RunSelectField, type RunStatsQueryParams as RunStatsQueryParams, type RunType as RunType, type RunTypeEnum as RunTypeEnum, type RunsFilterDataSourceTypeEnum as RunsFilterDataSourceTypeEnum, type RunGetURLResponse as RunGetURLResponse, type RunsItemsCursorPostPagination as RunsItemsCursorPostPagination, type RunGetURLParams as RunGetURLParams, type RunQueryV2Params as RunQueryV2Params, type RunRetrieveV2Params as RunRetrieveV2Params, type RunRetrieveParams as RunRetrieveParams, type RunQueryParams as RunQueryParams, };
|
|
226
|
-
export { Threads as Threads, type Thread as Thread, type ThreadStats as ThreadStats, type ThreadTrace as ThreadTrace, type ThreadTracesItemsCursorGetPagination as ThreadTracesItemsCursorGetPagination, type ThreadsItemsCursorPostPagination as ThreadsItemsCursorPostPagination, type ThreadListTracesParams as ThreadListTracesParams, type ThreadQueryParams as ThreadQueryParams, type ThreadStatsParams as ThreadStatsParams, };
|
|
235
|
+
export { Threads as Threads, type Thread as Thread, type ThreadStats as ThreadStats, type ThreadTrace as ThreadTrace, type ThreadAggregateStatsResponse as ThreadAggregateStatsResponse, type ThreadTracesItemsCursorGetPagination as ThreadTracesItemsCursorGetPagination, type ThreadsItemsCursorPostPagination as ThreadsItemsCursorPostPagination, type ThreadAggregateStatsParams as ThreadAggregateStatsParams, type ThreadListTracesParams as ThreadListTracesParams, type ThreadQueryParams as ThreadQueryParams, type ThreadStatsParams as ThreadStatsParams, };
|
|
227
236
|
export { Traces as Traces, type Trace as Trace, type TraceAggregates as TraceAggregates, type TraceListRunsResponse as TraceListRunsResponse, type TracesItemsCursorPostPagination as TracesItemsCursorPostPagination, type TraceListRunsParams as TraceListRunsParams, type TraceQueryParams as TraceQueryParams, };
|
|
228
237
|
export { OnlineEvaluators as OnlineEvaluators, type BulkDeleteEvaluatorFailedItem as BulkDeleteEvaluatorFailedItem, type BulkDeleteEvaluatorsResponse as BulkDeleteEvaluatorsResponse, type CreateOnlineCodeEvaluatorRequest as CreateOnlineCodeEvaluatorRequest, type CreateOnlineEvaluatorRequest as CreateOnlineEvaluatorRequest, type CreateOnlineEvaluatorResponse as CreateOnlineEvaluatorResponse, type CreateOnlineLlmEvaluatorRequest as CreateOnlineLlmEvaluatorRequest, type GetOnlineEvaluatorSpendResponse as GetOnlineEvaluatorSpendResponse, type OnlineCodeEvaluator as OnlineCodeEvaluator, type OnlineEvaluator as OnlineEvaluator, type OnlineEvaluatorRunRule as OnlineEvaluatorRunRule, type OnlineEvaluatorSpendDay as OnlineEvaluatorSpendDay, type OnlineEvaluatorSpendGroup as OnlineEvaluatorSpendGroup, type OnlineEvaluatorType as OnlineEvaluatorType, type OnlineLlmEvaluator as OnlineLlmEvaluator, type OnlineSpendLimit as OnlineSpendLimit, type UpdateOnlineCodeEvaluatorRequest as UpdateOnlineCodeEvaluatorRequest, type UpdateOnlineEvaluatorRequest as UpdateOnlineEvaluatorRequest, type UpdateOnlineEvaluatorResponse as UpdateOnlineEvaluatorResponse, type UpdateOnlineLlmEvaluatorRequest as UpdateOnlineLlmEvaluatorRequest, type OnlineEvaluatorsOffsetPaginationOnlineEvaluators as OnlineEvaluatorsOffsetPaginationOnlineEvaluators, type OnlineEvaluatorCreateParams as OnlineEvaluatorCreateParams, type OnlineEvaluatorUpdateParams as OnlineEvaluatorUpdateParams, type OnlineEvaluatorListParams as OnlineEvaluatorListParams, type OnlineEvaluatorDeleteParams as OnlineEvaluatorDeleteParams, type OnlineEvaluatorBulkDeleteParams as OnlineEvaluatorBulkDeleteParams, type OnlineEvaluatorSpendParams as OnlineEvaluatorSpendParams, };
|
|
229
238
|
export { Public as Public };
|
|
230
239
|
export { AnnotationQueues as AnnotationQueues, 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, };
|
|
231
240
|
export { Info as Info, type InfoListResponse as InfoListResponse };
|
|
232
|
-
export { Issues as Issues, type Issue as Issue, type IssuesOffsetPaginationIssues as IssuesOffsetPaginationIssues, type IssueListParams as IssueListParams, };
|
|
233
|
-
export { Sandboxes as Sandboxes, type DownloadURLResponse as DownloadURLResponse, type SandboxListResponse as SandboxListResponse, type SandboxResponse as SandboxResponse, type SandboxStatusResponse as SandboxStatusResponse, type ServiceURLResponse as ServiceURLResponse, type SnapshotListResponse as SnapshotListResponse, type SnapshotResponse as SnapshotResponse, };
|
|
241
|
+
export { Issues as Issues, type Issue as Issue, type IssuesOffsetPaginationIssues as IssuesOffsetPaginationIssues, type IssueRetrieveParams as IssueRetrieveParams, type IssueListParams as IssueListParams, };
|
|
242
|
+
export { Sandboxes as Sandboxes, type DownloadURLResponse as DownloadURLResponse, type SandboxListResponse as SandboxListResponse, type SandboxResponse as SandboxResponse, type SandboxStatusResponse as SandboxStatusResponse, type ServiceURLResponse as ServiceURLResponse, type SnapshotListResponse as SnapshotListResponse, type SnapshotResponse as SnapshotResponse, type SandboxListUsageCostsResponse as SandboxListUsageCostsResponse, type SandboxListUsageCostsResponsesItemsCursorGetPagination as SandboxListUsageCostsResponsesItemsCursorGetPagination, type SandboxListUsageCostsParams as SandboxListUsageCostsParams, };
|
|
234
243
|
}
|
|
@@ -27,15 +27,18 @@ import * as Uploads from './core/uploads.js';
|
|
|
27
27
|
import * as API from './resources/index.js';
|
|
28
28
|
import { APIPromise } from './core/api-promise.js';
|
|
29
29
|
import { Info } from './resources/info.js';
|
|
30
|
-
import { Issues } from './resources/issues.js';
|
|
30
|
+
import { Issues, } from './resources/issues.js';
|
|
31
31
|
import { OnlineEvaluators, } from './resources/online-evaluators.js';
|
|
32
|
-
import {
|
|
32
|
+
import { ProductFeedback, } from './resources/product-feedback.js';
|
|
33
|
+
import { Sessions, } from './resources/sessions.js';
|
|
33
34
|
import { Traces, } from './resources/traces.js';
|
|
34
35
|
import { AnnotationQueues, } from './resources/annotation-queues/annotation-queues.js';
|
|
35
36
|
import { Datasets, } from './resources/datasets/datasets.js';
|
|
37
|
+
import { Fleet } from './resources/fleet/fleet.js';
|
|
36
38
|
import { Public } from './resources/public/public.js';
|
|
37
39
|
import { Runs, } from './resources/runs/runs.js';
|
|
38
40
|
import { Sandboxes, } from './resources/sandboxes/sandboxes.js';
|
|
41
|
+
import { Threads, } from './resources/threads/threads.js';
|
|
39
42
|
import { buildHeaders } from './internal/headers.js';
|
|
40
43
|
import { readEnv } from './internal/utils/env.js';
|
|
41
44
|
import { formatRequestDetails, loggerFor, parseLogLevel, } from './internal/utils/log.js';
|
|
@@ -126,6 +129,24 @@ export class Langsmith {
|
|
|
126
129
|
writable: true,
|
|
127
130
|
value: void 0
|
|
128
131
|
});
|
|
132
|
+
Object.defineProperty(this, "productFeedback", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
configurable: true,
|
|
135
|
+
writable: true,
|
|
136
|
+
value: new API.ProductFeedback(this)
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(this, "fleet", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
configurable: true,
|
|
141
|
+
writable: true,
|
|
142
|
+
value: new API.Fleet(this)
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(this, "sessions", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
configurable: true,
|
|
147
|
+
writable: true,
|
|
148
|
+
value: new API.Sessions(this)
|
|
149
|
+
});
|
|
129
150
|
Object.defineProperty(this, "datasets", {
|
|
130
151
|
enumerable: true,
|
|
131
152
|
configurable: true,
|
|
@@ -193,7 +214,7 @@ export class Langsmith {
|
|
|
193
214
|
baseURL: baseURL || `https://api.smith.langchain.com/`,
|
|
194
215
|
};
|
|
195
216
|
this.baseURL = options.baseURL;
|
|
196
|
-
this.timeout = options.timeout ?? _a.DEFAULT_TIMEOUT
|
|
217
|
+
this.timeout = options.timeout ?? _a.DEFAULT_TIMEOUT /* 1.5 minutes */;
|
|
197
218
|
this.logger = options.logger ?? console;
|
|
198
219
|
const defaultLogLevel = 'warn';
|
|
199
220
|
// Set default logLevel early so that we can log a warning in parseLogLevel.
|
|
@@ -725,6 +746,9 @@ Object.defineProperty(Langsmith, "toFile", {
|
|
|
725
746
|
writable: true,
|
|
726
747
|
value: Uploads.toFile
|
|
727
748
|
});
|
|
749
|
+
Langsmith.ProductFeedback = ProductFeedback;
|
|
750
|
+
Langsmith.Fleet = Fleet;
|
|
751
|
+
Langsmith.Sessions = Sessions;
|
|
728
752
|
Langsmith.Datasets = Datasets;
|
|
729
753
|
Langsmith.Runs = Runs;
|
|
730
754
|
Langsmith.Threads = Threads;
|
|
@@ -38,7 +38,7 @@ const getPlatformProperties = () => {
|
|
|
38
38
|
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
39
39
|
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
40
40
|
'X-Stainless-Runtime': 'deno',
|
|
41
|
-
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version :
|
|
41
|
+
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown',
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
if (typeof EdgeRuntime !== 'undefined') {
|
|
@@ -34,7 +34,7 @@ const getPlatformProperties = () => {
|
|
|
34
34
|
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
35
35
|
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
36
36
|
'X-Stainless-Runtime': 'deno',
|
|
37
|
-
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version :
|
|
37
|
+
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown',
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
if (typeof EdgeRuntime !== 'undefined') {
|
|
@@ -35,8 +35,10 @@ class Items extends resource_js_1.APIResource {
|
|
|
35
35
|
/**
|
|
36
36
|
* List RUN and THREAD items in a single annotation queue for one review status
|
|
37
37
|
* section, with opaque cursor pagination. Optional item_type=RUN|THREAD filters
|
|
38
|
-
* the page.
|
|
39
|
-
*
|
|
38
|
+
* the page. Optional min_start_time/max_start_time bound the item's trace start
|
|
39
|
+
* time; items with no start time are excluded when either bound is set.
|
|
40
|
+
* direction=backward returns items before the supplied cursor. The response
|
|
41
|
+
* contains item metadata only, not expanded run or thread payloads.
|
|
40
42
|
* status=archived returns items whose queue review requirements have been
|
|
41
43
|
* satisfied, not merely items the caller personally marked completed.
|
|
42
44
|
*/
|
|
@@ -54,7 +56,8 @@ class Items extends resource_js_1.APIResource {
|
|
|
54
56
|
});
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
|
-
* Remove RUN or THREAD items from a single annotation queue by item ID.
|
|
59
|
+
* Remove RUN or THREAD items from a single annotation queue by item ID. Both
|
|
60
|
+
* active and completed items can be removed.
|
|
58
61
|
*/
|
|
59
62
|
deleteAll(queueID, body, options) {
|
|
60
63
|
return this._client.post((0, path_js_1.path) `/api/v1/platform/annotation-queues/${queueID}/items/delete`, {
|
|
@@ -63,8 +66,10 @@ class Items extends resource_js_1.APIResource {
|
|
|
63
66
|
});
|
|
64
67
|
}
|
|
65
68
|
/**
|
|
66
|
-
* Returns the number of annotation queue items
|
|
67
|
-
*
|
|
69
|
+
* Returns the number of annotation queue items in one status bucket. The two time
|
|
70
|
+
* windows are independent: start_time/end_time bound when an item was archived,
|
|
71
|
+
* min_start_time/max_start_time bound when its trace ran. Items with no trace
|
|
72
|
+
* start time are excluded when either of the latter is set.
|
|
68
73
|
*/
|
|
69
74
|
retrieveCount(queueID, query, options) {
|
|
70
75
|
return this._client.get((0, path_js_1.path) `/api/v1/platform/annotation-queues/${queueID}/items/count`, {
|
|
@@ -74,7 +79,9 @@ class Items extends resource_js_1.APIResource {
|
|
|
74
79
|
}
|
|
75
80
|
/**
|
|
76
81
|
* Resolve a RUN or THREAD item to its current review section and zero-based
|
|
77
|
-
* position for deep linking.
|
|
82
|
+
* position for deep linking. The returned cursor counts RUN and THREAD items
|
|
83
|
+
* together, so it is only valid for a list request with no item_type or start-time
|
|
84
|
+
* filter.
|
|
78
85
|
*/
|
|
79
86
|
retrievePlacement(itemID, params, options) {
|
|
80
87
|
const { queue_id } = params;
|
|
@@ -18,8 +18,10 @@ export declare class Items extends APIResource {
|
|
|
18
18
|
/**
|
|
19
19
|
* List RUN and THREAD items in a single annotation queue for one review status
|
|
20
20
|
* section, with opaque cursor pagination. Optional item_type=RUN|THREAD filters
|
|
21
|
-
* the page.
|
|
22
|
-
*
|
|
21
|
+
* the page. Optional min_start_time/max_start_time bound the item's trace start
|
|
22
|
+
* time; items with no start time are excluded when either bound is set.
|
|
23
|
+
* direction=backward returns items before the supplied cursor. The response
|
|
24
|
+
* contains item metadata only, not expanded run or thread payloads.
|
|
23
25
|
* status=archived returns items whose queue review requirements have been
|
|
24
26
|
* satisfied, not merely items the caller personally marked completed.
|
|
25
27
|
*/
|
|
@@ -30,17 +32,22 @@ export declare class Items extends APIResource {
|
|
|
30
32
|
*/
|
|
31
33
|
createStatus(queueItemID: string, body: ItemCreateStatusParams, options?: RequestOptions): APIPromise<ItemCreateStatusResponse>;
|
|
32
34
|
/**
|
|
33
|
-
* Remove RUN or THREAD items from a single annotation queue by item ID.
|
|
35
|
+
* Remove RUN or THREAD items from a single annotation queue by item ID. Both
|
|
36
|
+
* active and completed items can be removed.
|
|
34
37
|
*/
|
|
35
38
|
deleteAll(queueID: string, body: ItemDeleteAllParams, options?: RequestOptions): APIPromise<ItemDeleteAllResponse>;
|
|
36
39
|
/**
|
|
37
|
-
* Returns the number of annotation queue items
|
|
38
|
-
*
|
|
40
|
+
* Returns the number of annotation queue items in one status bucket. The two time
|
|
41
|
+
* windows are independent: start_time/end_time bound when an item was archived,
|
|
42
|
+
* min_start_time/max_start_time bound when its trace ran. Items with no trace
|
|
43
|
+
* start time are excluded when either of the latter is set.
|
|
39
44
|
*/
|
|
40
45
|
retrieveCount(queueID: string, query: ItemRetrieveCountParams, options?: RequestOptions): APIPromise<ItemRetrieveCountResponse>;
|
|
41
46
|
/**
|
|
42
47
|
* Resolve a RUN or THREAD item to its current review section and zero-based
|
|
43
|
-
* position for deep linking.
|
|
48
|
+
* position for deep linking. The returned cursor counts RUN and THREAD items
|
|
49
|
+
* together, so it is only valid for a list request with no item_type or start-time
|
|
50
|
+
* filter.
|
|
44
51
|
*/
|
|
45
52
|
retrievePlacement(itemID: string, params: ItemRetrievePlacementParams, options?: RequestOptions): APIPromise<ItemRetrievePlacementResponse>;
|
|
46
53
|
}
|
|
@@ -174,6 +181,16 @@ export interface ItemListParams extends ItemsCursorGetPaginationParams {
|
|
|
174
181
|
* Filter to RUN or THREAD
|
|
175
182
|
*/
|
|
176
183
|
item_type?: 'RUN' | 'THREAD';
|
|
184
|
+
/**
|
|
185
|
+
* Only items whose trace start time is at or before this timestamp. Omit or send
|
|
186
|
+
* the zero time for no bound
|
|
187
|
+
*/
|
|
188
|
+
max_start_time?: string;
|
|
189
|
+
/**
|
|
190
|
+
* Only items whose trace start time is at or after this timestamp. Omit or send
|
|
191
|
+
* the zero time for no bound
|
|
192
|
+
*/
|
|
193
|
+
min_start_time?: string;
|
|
177
194
|
}
|
|
178
195
|
export interface ItemCreateStatusParams {
|
|
179
196
|
override_added_at?: string;
|
|
@@ -188,11 +205,19 @@ export interface ItemRetrieveCountParams {
|
|
|
188
205
|
*/
|
|
189
206
|
status: string;
|
|
190
207
|
/**
|
|
191
|
-
*
|
|
208
|
+
* Archived strictly before this time. Only used when status=archived
|
|
192
209
|
*/
|
|
193
210
|
end_time?: string;
|
|
194
211
|
/**
|
|
195
|
-
*
|
|
212
|
+
* Trace started at or before this time
|
|
213
|
+
*/
|
|
214
|
+
max_start_time?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Trace started at or after this time
|
|
217
|
+
*/
|
|
218
|
+
min_start_time?: string;
|
|
219
|
+
/**
|
|
220
|
+
* Archived strictly after this time. Only used when status=archived
|
|
196
221
|
*/
|
|
197
222
|
start_time?: string;
|
|
198
223
|
}
|
|
@@ -32,8 +32,10 @@ export class Items extends APIResource {
|
|
|
32
32
|
/**
|
|
33
33
|
* List RUN and THREAD items in a single annotation queue for one review status
|
|
34
34
|
* section, with opaque cursor pagination. Optional item_type=RUN|THREAD filters
|
|
35
|
-
* the page.
|
|
36
|
-
*
|
|
35
|
+
* the page. Optional min_start_time/max_start_time bound the item's trace start
|
|
36
|
+
* time; items with no start time are excluded when either bound is set.
|
|
37
|
+
* direction=backward returns items before the supplied cursor. The response
|
|
38
|
+
* contains item metadata only, not expanded run or thread payloads.
|
|
37
39
|
* status=archived returns items whose queue review requirements have been
|
|
38
40
|
* satisfied, not merely items the caller personally marked completed.
|
|
39
41
|
*/
|
|
@@ -51,7 +53,8 @@ export class Items extends APIResource {
|
|
|
51
53
|
});
|
|
52
54
|
}
|
|
53
55
|
/**
|
|
54
|
-
* Remove RUN or THREAD items from a single annotation queue by item ID.
|
|
56
|
+
* Remove RUN or THREAD items from a single annotation queue by item ID. Both
|
|
57
|
+
* active and completed items can be removed.
|
|
55
58
|
*/
|
|
56
59
|
deleteAll(queueID, body, options) {
|
|
57
60
|
return this._client.post(path `/api/v1/platform/annotation-queues/${queueID}/items/delete`, {
|
|
@@ -60,8 +63,10 @@ export class Items extends APIResource {
|
|
|
60
63
|
});
|
|
61
64
|
}
|
|
62
65
|
/**
|
|
63
|
-
* Returns the number of annotation queue items
|
|
64
|
-
*
|
|
66
|
+
* Returns the number of annotation queue items in one status bucket. The two time
|
|
67
|
+
* windows are independent: start_time/end_time bound when an item was archived,
|
|
68
|
+
* min_start_time/max_start_time bound when its trace ran. Items with no trace
|
|
69
|
+
* start time are excluded when either of the latter is set.
|
|
65
70
|
*/
|
|
66
71
|
retrieveCount(queueID, query, options) {
|
|
67
72
|
return this._client.get(path `/api/v1/platform/annotation-queues/${queueID}/items/count`, {
|
|
@@ -71,7 +76,9 @@ export class Items extends APIResource {
|
|
|
71
76
|
}
|
|
72
77
|
/**
|
|
73
78
|
* Resolve a RUN or THREAD item to its current review section and zero-based
|
|
74
|
-
* position for deep linking.
|
|
79
|
+
* position for deep linking. The returned cursor counts RUN and THREAD items
|
|
80
|
+
* together, so it is only valid for a list request with no item_type or start-time
|
|
81
|
+
* filter.
|
|
75
82
|
*/
|
|
76
83
|
retrievePlacement(itemID, params, options) {
|
|
77
84
|
const { queue_id } = params;
|
|
@@ -37,11 +37,19 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
exports.Datasets = void 0;
|
|
39
39
|
const resource_js_1 = require("../../core/resource.cjs");
|
|
40
|
+
const ExamplesAPI = __importStar(require("./examples.cjs"));
|
|
41
|
+
const examples_js_1 = require("./examples.cjs");
|
|
40
42
|
const ExperimentRunsAPI = __importStar(require("./experiment-runs.cjs"));
|
|
41
43
|
const experiment_runs_js_1 = require("./experiment-runs.cjs");
|
|
42
44
|
class Datasets extends resource_js_1.APIResource {
|
|
43
45
|
constructor() {
|
|
44
46
|
super(...arguments);
|
|
47
|
+
Object.defineProperty(this, "examples", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
configurable: true,
|
|
50
|
+
writable: true,
|
|
51
|
+
value: new ExamplesAPI.Examples(this._client)
|
|
52
|
+
});
|
|
45
53
|
Object.defineProperty(this, "experimentRuns", {
|
|
46
54
|
enumerable: true,
|
|
47
55
|
configurable: true,
|
|
@@ -51,4 +59,5 @@ class Datasets extends resource_js_1.APIResource {
|
|
|
51
59
|
}
|
|
52
60
|
}
|
|
53
61
|
exports.Datasets = Datasets;
|
|
62
|
+
Datasets.Examples = examples_js_1.Examples;
|
|
54
63
|
Datasets.ExperimentRuns = experiment_runs_js_1.ExperimentRuns;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as ExamplesAPI from './examples.js';
|
|
3
|
+
import { ExampleDeleteParams, Examples } from './examples.js';
|
|
2
4
|
import * as ExperimentRunsAPI from './experiment-runs.js';
|
|
3
5
|
import { ExperimentRunQueryParams, ExperimentRunQueryResponse, ExperimentRunQueryResponsesItemsCursorPostPagination, ExperimentRuns } from './experiment-runs.js';
|
|
4
6
|
export declare class Datasets extends APIResource {
|
|
7
|
+
examples: ExamplesAPI.Examples;
|
|
5
8
|
experimentRuns: ExperimentRunsAPI.ExperimentRuns;
|
|
6
9
|
}
|
|
7
10
|
/**
|
|
@@ -146,5 +149,6 @@ export interface Missing {
|
|
|
146
149
|
export type SortByDatasetColumn = 'name' | 'created_at' | 'last_session_start_time' | 'example_count' | 'session_count' | 'modified_at';
|
|
147
150
|
export declare namespace Datasets {
|
|
148
151
|
export { type DataType as DataType, type Dataset as Dataset, type DatasetTransformation as DatasetTransformation, type DatasetVersion as DatasetVersion, type FeedbackCreateCoreSchema as FeedbackCreateCoreSchema, type Missing as Missing, type SortByDatasetColumn as SortByDatasetColumn, };
|
|
152
|
+
export { Examples as Examples, type ExampleDeleteParams as ExampleDeleteParams };
|
|
149
153
|
export { ExperimentRuns as ExperimentRuns, type ExperimentRunQueryResponse as ExperimentRunQueryResponse, type ExperimentRunQueryResponsesItemsCursorPostPagination as ExperimentRunQueryResponsesItemsCursorPostPagination, type ExperimentRunQueryParams as ExperimentRunQueryParams, };
|
|
150
154
|
}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
import { APIResource } from '../../core/resource.js';
|
|
4
|
+
import * as ExamplesAPI from './examples.js';
|
|
5
|
+
import { Examples } from './examples.js';
|
|
4
6
|
import * as ExperimentRunsAPI from './experiment-runs.js';
|
|
5
7
|
import { ExperimentRuns, } from './experiment-runs.js';
|
|
6
8
|
export class Datasets extends APIResource {
|
|
7
9
|
constructor() {
|
|
8
10
|
super(...arguments);
|
|
11
|
+
Object.defineProperty(this, "examples", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: new ExamplesAPI.Examples(this._client)
|
|
16
|
+
});
|
|
9
17
|
Object.defineProperty(this, "experimentRuns", {
|
|
10
18
|
enumerable: true,
|
|
11
19
|
configurable: true,
|
|
@@ -14,4 +22,5 @@ export class Datasets extends APIResource {
|
|
|
14
22
|
});
|
|
15
23
|
}
|
|
16
24
|
}
|
|
25
|
+
Datasets.Examples = Examples;
|
|
17
26
|
Datasets.ExperimentRuns = ExperimentRuns;
|
|
@@ -0,0 +1,26 @@
|
|
|
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.Examples = void 0;
|
|
6
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
7
|
+
const headers_js_1 = require("../../internal/headers.cjs");
|
|
8
|
+
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
9
|
+
class Examples extends resource_js_1.APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Soft-delete an example, preserving prior versions and their attachments. If the
|
|
12
|
+
* latest version is already deleted, the request succeeds without creating another
|
|
13
|
+
* version. Deletion is recorded at the current time or just after the latest
|
|
14
|
+
* version, whichever is later. For future-dated versions, latest reads reflect
|
|
15
|
+
* deletion immediately; timestamp reads reflect deletion only at or after the
|
|
16
|
+
* recorded deletion timestamp.
|
|
17
|
+
*/
|
|
18
|
+
delete(exampleID, params, options) {
|
|
19
|
+
const { dataset_id } = params;
|
|
20
|
+
return this._client.delete((0, path_js_1.path) `/api/v1/platform/datasets/${dataset_id}/examples/${exampleID}`, {
|
|
21
|
+
...options,
|
|
22
|
+
headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.Examples = Examples;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import { APIPromise } from '../../core/api-promise.js';
|
|
3
|
+
import { RequestOptions } from '../../internal/request-options.js';
|
|
4
|
+
export declare class Examples extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Soft-delete an example, preserving prior versions and their attachments. If the
|
|
7
|
+
* latest version is already deleted, the request succeeds without creating another
|
|
8
|
+
* version. Deletion is recorded at the current time or just after the latest
|
|
9
|
+
* version, whichever is later. For future-dated versions, latest reads reflect
|
|
10
|
+
* deletion immediately; timestamp reads reflect deletion only at or after the
|
|
11
|
+
* recorded deletion timestamp.
|
|
12
|
+
*/
|
|
13
|
+
delete(exampleID: string, params: ExampleDeleteParams, options?: RequestOptions): APIPromise<void>;
|
|
14
|
+
}
|
|
15
|
+
export interface ExampleDeleteParams {
|
|
16
|
+
/**
|
|
17
|
+
* Dataset ID
|
|
18
|
+
*/
|
|
19
|
+
dataset_id: string;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace Examples {
|
|
22
|
+
export { type ExampleDeleteParams as ExampleDeleteParams };
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { buildHeaders } from '../../internal/headers.js';
|
|
5
|
+
import { path } from '../../internal/utils/path.js';
|
|
6
|
+
export class Examples extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Soft-delete an example, preserving prior versions and their attachments. If the
|
|
9
|
+
* latest version is already deleted, the request succeeds without creating another
|
|
10
|
+
* version. Deletion is recorded at the current time or just after the latest
|
|
11
|
+
* version, whichever is later. For future-dated versions, latest reads reflect
|
|
12
|
+
* deletion immediately; timestamp reads reflect deletion only at or after the
|
|
13
|
+
* recorded deletion timestamp.
|
|
14
|
+
*/
|
|
15
|
+
delete(exampleID, params, options) {
|
|
16
|
+
const { dataset_id } = params;
|
|
17
|
+
return this._client.delete(path `/api/v1/platform/datasets/${dataset_id}/examples/${exampleID}`, {
|
|
18
|
+
...options,
|
|
19
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
+
}) : function(o, v) {
|
|
18
|
+
o["default"] = v;
|
|
19
|
+
});
|
|
20
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
+
var ownKeys = function(o) {
|
|
22
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
+
var ar = [];
|
|
24
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
+
return ar;
|
|
26
|
+
};
|
|
27
|
+
return ownKeys(o);
|
|
28
|
+
};
|
|
29
|
+
return function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.Fleet = void 0;
|
|
39
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
40
|
+
const ThreadsAPI = __importStar(require("./threads.cjs"));
|
|
41
|
+
const threads_js_1 = require("./threads.cjs");
|
|
42
|
+
class Fleet extends resource_js_1.APIResource {
|
|
43
|
+
constructor() {
|
|
44
|
+
super(...arguments);
|
|
45
|
+
Object.defineProperty(this, "threads", {
|
|
46
|
+
enumerable: true,
|
|
47
|
+
configurable: true,
|
|
48
|
+
writable: true,
|
|
49
|
+
value: new ThreadsAPI.Threads(this._client)
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.Fleet = Fleet;
|
|
54
|
+
Fleet.Threads = threads_js_1.Threads;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as ThreadsAPI from './threads.js';
|
|
3
|
+
import { ThreadActivateSandboxResponse, Threads } from './threads.js';
|
|
4
|
+
export declare class Fleet extends APIResource {
|
|
5
|
+
threads: ThreadsAPI.Threads;
|
|
6
|
+
}
|
|
7
|
+
export declare namespace Fleet {
|
|
8
|
+
export { Threads as Threads, type ThreadActivateSandboxResponse as ThreadActivateSandboxResponse };
|
|
9
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 ThreadsAPI from './threads.js';
|
|
5
|
+
import { Threads } from './threads.js';
|
|
6
|
+
export class Fleet extends APIResource {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
Object.defineProperty(this, "threads", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: new ThreadsAPI.Threads(this._client)
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
Fleet.Threads = Threads;
|
|
@@ -0,0 +1,18 @@
|
|
|
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.Threads = void 0;
|
|
6
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
7
|
+
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
8
|
+
class Threads extends resource_js_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Starts or resumes the sandbox referenced by the thread and returns when it is
|
|
11
|
+
* ready. The operation is idempotent. The thread must include
|
|
12
|
+
* sandbox.sandbox_slug.
|
|
13
|
+
*/
|
|
14
|
+
activateSandbox(threadID, options) {
|
|
15
|
+
return this._client.post((0, path_js_1.path) `/v1/fleet/threads/${threadID}/sandbox-activation`, options);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Threads = Threads;
|