langsmith 0.7.14 → 0.7.16

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.
Files changed (61) hide show
  1. package/dist/_openapi_client/client.cjs +9 -1
  2. package/dist/_openapi_client/client.d.ts +10 -5
  3. package/dist/_openapi_client/client.js +9 -1
  4. package/dist/_openapi_client/core/pagination.cjs +29 -1
  5. package/dist/_openapi_client/core/pagination.d.ts +11 -0
  6. package/dist/_openapi_client/core/pagination.js +27 -0
  7. package/dist/_openapi_client/resources/datasets/datasets.cjs +0 -130
  8. package/dist/_openapi_client/resources/datasets/datasets.d.ts +3 -271
  9. package/dist/_openapi_client/resources/datasets/datasets.js +0 -130
  10. package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +1 -1
  11. package/dist/_openapi_client/resources/datasets/experiment-runs.d.ts +9 -9
  12. package/dist/_openapi_client/resources/datasets/experiment-runs.js +1 -1
  13. package/dist/_openapi_client/resources/index.cjs +4 -2
  14. package/dist/_openapi_client/resources/index.d.ts +3 -2
  15. package/dist/_openapi_client/resources/index.js +2 -1
  16. package/dist/_openapi_client/resources/issues.cjs +31 -0
  17. package/dist/_openapi_client/resources/issues.d.ts +78 -0
  18. package/dist/_openapi_client/resources/issues.js +27 -0
  19. package/dist/_openapi_client/resources/runs.cjs +69 -15
  20. package/dist/_openapi_client/resources/runs.d.ts +806 -1
  21. package/dist/_openapi_client/resources/runs.js +67 -1
  22. package/dist/_openapi_client/resources/sessions.d.ts +1 -1
  23. package/dist/client.cjs +1 -5
  24. package/dist/client.d.ts +2 -5
  25. package/dist/client.js +1 -5
  26. package/dist/experimental/anthropic/context.cjs +1 -0
  27. package/dist/experimental/anthropic/context.js +1 -0
  28. package/dist/index.cjs +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/utils/constants.cjs +1 -1
  32. package/dist/utils/constants.d.ts +1 -1
  33. package/dist/utils/constants.js +1 -1
  34. package/dist/utils/env.cjs +1 -1
  35. package/dist/utils/env.d.ts +0 -7
  36. package/dist/utils/env.js +1 -1
  37. package/package.json +10 -10
  38. package/dist/_openapi_client/resources/datasets/comparative.cjs +0 -22
  39. package/dist/_openapi_client/resources/datasets/comparative.d.ts +0 -55
  40. package/dist/_openapi_client/resources/datasets/comparative.js +0 -18
  41. package/dist/_openapi_client/resources/datasets/runs.cjs +0 -22
  42. package/dist/_openapi_client/resources/datasets/runs.d.ts +0 -172
  43. package/dist/_openapi_client/resources/datasets/runs.js +0 -18
  44. package/dist/_openapi_client/resources/datasets/share.cjs +0 -32
  45. package/dist/_openapi_client/resources/datasets/share.d.ts +0 -28
  46. package/dist/_openapi_client/resources/datasets/share.js +0 -28
  47. package/dist/_openapi_client/resources/datasets/splits.cjs +0 -22
  48. package/dist/_openapi_client/resources/datasets/splits.d.ts +0 -30
  49. package/dist/_openapi_client/resources/datasets/splits.js +0 -18
  50. package/dist/_openapi_client/resources/datasets/versions.cjs +0 -23
  51. package/dist/_openapi_client/resources/datasets/versions.d.ts +0 -36
  52. package/dist/_openapi_client/resources/datasets/versions.js +0 -19
  53. package/dist/_openapi_client/resources/runs/index.cjs +0 -9
  54. package/dist/_openapi_client/resources/runs/index.d.ts +0 -2
  55. package/dist/_openapi_client/resources/runs/index.js +0 -4
  56. package/dist/_openapi_client/resources/runs/rules.cjs +0 -9
  57. package/dist/_openapi_client/resources/runs/rules.d.ts +0 -3
  58. package/dist/_openapi_client/resources/runs/rules.js +0 -5
  59. package/dist/_openapi_client/resources/runs/runs.cjs +0 -115
  60. package/dist/_openapi_client/resources/runs/runs.d.ts +0 -800
  61. package/dist/_openapi_client/resources/runs/runs.js +0 -78
@@ -1,28 +0,0 @@
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 Share extends APIResource {
5
- /**
6
- * Share a dataset.
7
- */
8
- create(datasetID: string, params?: ShareCreateParams | null | undefined, options?: RequestOptions): APIPromise<DatasetShareSchema>;
9
- /**
10
- * Get the state of sharing a dataset
11
- */
12
- retrieve(datasetID: string, options?: RequestOptions): APIPromise<DatasetShareSchema | null>;
13
- /**
14
- * Unshare a dataset.
15
- */
16
- deleteAll(datasetID: string, options?: RequestOptions): APIPromise<unknown>;
17
- }
18
- export interface DatasetShareSchema {
19
- dataset_id: string;
20
- share_token: string;
21
- }
22
- export type ShareDeleteAllResponse = unknown;
23
- export interface ShareCreateParams {
24
- share_projects?: boolean;
25
- }
26
- export declare namespace Share {
27
- export { type DatasetShareSchema as DatasetShareSchema, type ShareDeleteAllResponse as ShareDeleteAllResponse, type ShareCreateParams as ShareCreateParams, };
28
- }
@@ -1,28 +0,0 @@
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 Share extends APIResource {
6
- /**
7
- * Share a dataset.
8
- */
9
- create(datasetID, params = {}, options) {
10
- const { share_projects } = params ?? {};
11
- return this._client.put(path `/api/v1/datasets/${datasetID}/share`, {
12
- query: { share_projects },
13
- ...options,
14
- });
15
- }
16
- /**
17
- * Get the state of sharing a dataset
18
- */
19
- retrieve(datasetID, options) {
20
- return this._client.get(path `/api/v1/datasets/${datasetID}/share`, options);
21
- }
22
- /**
23
- * Unshare a dataset.
24
- */
25
- deleteAll(datasetID, options) {
26
- return this._client.delete(path `/api/v1/datasets/${datasetID}/share`, options);
27
- }
28
- }
@@ -1,22 +0,0 @@
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.Splits = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const path_js_1 = require("../../internal/utils/path.cjs");
8
- class Splits extends resource_js_1.APIResource {
9
- /**
10
- * Update Dataset Splits
11
- */
12
- create(datasetID, body, options) {
13
- return this._client.put((0, path_js_1.path) `/api/v1/datasets/${datasetID}/splits`, { body, ...options });
14
- }
15
- /**
16
- * Get Dataset Splits
17
- */
18
- retrieve(datasetID, query = {}, options) {
19
- return this._client.get((0, path_js_1.path) `/api/v1/datasets/${datasetID}/splits`, { query, ...options });
20
- }
21
- }
22
- exports.Splits = Splits;
@@ -1,30 +0,0 @@
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 Splits extends APIResource {
5
- /**
6
- * Update Dataset Splits
7
- */
8
- create(datasetID: string, body: SplitCreateParams, options?: RequestOptions): APIPromise<SplitCreateResponse>;
9
- /**
10
- * Get Dataset Splits
11
- */
12
- retrieve(datasetID: string, query?: SplitRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<SplitRetrieveResponse>;
13
- }
14
- export type SplitCreateResponse = Array<string>;
15
- export type SplitRetrieveResponse = Array<string>;
16
- export interface SplitCreateParams {
17
- examples: Array<string>;
18
- split_name: string;
19
- remove?: boolean;
20
- }
21
- export interface SplitRetrieveParams {
22
- /**
23
- * Only modifications made on or before this time are included. If None, the latest
24
- * version of the dataset is used.
25
- */
26
- as_of?: (string & {}) | string;
27
- }
28
- export declare namespace Splits {
29
- export { type SplitCreateResponse as SplitCreateResponse, type SplitRetrieveResponse as SplitRetrieveResponse, type SplitCreateParams as SplitCreateParams, type SplitRetrieveParams as SplitRetrieveParams, };
30
- }
@@ -1,18 +0,0 @@
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 Splits extends APIResource {
6
- /**
7
- * Update Dataset Splits
8
- */
9
- create(datasetID, body, options) {
10
- return this._client.put(path `/api/v1/datasets/${datasetID}/splits`, { body, ...options });
11
- }
12
- /**
13
- * Get Dataset Splits
14
- */
15
- retrieve(datasetID, query = {}, options) {
16
- return this._client.get(path `/api/v1/datasets/${datasetID}/splits`, { query, ...options });
17
- }
18
- }
@@ -1,23 +0,0 @@
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.Versions = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- const pagination_js_1 = require("../../core/pagination.cjs");
8
- const path_js_1 = require("../../internal/utils/path.cjs");
9
- class Versions extends resource_js_1.APIResource {
10
- /**
11
- * Get dataset versions.
12
- */
13
- list(datasetID, query = {}, options) {
14
- return this._client.getAPIList((0, path_js_1.path) `/api/v1/datasets/${datasetID}/versions`, (pagination_js_1.OffsetPaginationTopLevelArray), { query, ...options });
15
- }
16
- /**
17
- * Get diff between two dataset versions.
18
- */
19
- retrieveDiff(datasetID, query, options) {
20
- return this._client.get((0, path_js_1.path) `/api/v1/datasets/${datasetID}/versions/diff`, { query, ...options });
21
- }
22
- }
23
- exports.Versions = Versions;
@@ -1,36 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as DatasetsAPI from './datasets.js';
3
- import { DatasetVersionsOffsetPaginationTopLevelArray } from './datasets.js';
4
- import { APIPromise } from '../../core/api-promise.js';
5
- import { type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
6
- import { RequestOptions } from '../../internal/request-options.js';
7
- export declare class Versions extends APIResource {
8
- /**
9
- * Get dataset versions.
10
- */
11
- list(datasetID: string, query?: VersionListParams | null | undefined, options?: RequestOptions): PagePromise<DatasetVersionsOffsetPaginationTopLevelArray, DatasetsAPI.DatasetVersion>;
12
- /**
13
- * Get diff between two dataset versions.
14
- */
15
- retrieveDiff(datasetID: string, query: VersionRetrieveDiffParams, options?: RequestOptions): APIPromise<VersionRetrieveDiffResponse>;
16
- }
17
- /**
18
- * Dataset diff schema.
19
- */
20
- export interface VersionRetrieveDiffResponse {
21
- examples_added: Array<string>;
22
- examples_modified: Array<string>;
23
- examples_removed: Array<string>;
24
- }
25
- export interface VersionListParams extends OffsetPaginationTopLevelArrayParams {
26
- example?: string | null;
27
- search?: string | null;
28
- }
29
- export interface VersionRetrieveDiffParams {
30
- from_version: (string & {}) | string;
31
- to_version: (string & {}) | string;
32
- }
33
- export declare namespace Versions {
34
- export { type VersionRetrieveDiffResponse as VersionRetrieveDiffResponse, type VersionListParams as VersionListParams, type VersionRetrieveDiffParams as VersionRetrieveDiffParams, };
35
- }
36
- export { type DatasetVersionsOffsetPaginationTopLevelArray };
@@ -1,19 +0,0 @@
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 { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
5
- import { path } from '../../internal/utils/path.js';
6
- export class Versions extends APIResource {
7
- /**
8
- * Get dataset versions.
9
- */
10
- list(datasetID, query = {}, options) {
11
- return this._client.getAPIList(path `/api/v1/datasets/${datasetID}/versions`, (OffsetPaginationTopLevelArray), { query, ...options });
12
- }
13
- /**
14
- * Get diff between two dataset versions.
15
- */
16
- retrieveDiff(datasetID, query, options) {
17
- return this._client.get(path `/api/v1/datasets/${datasetID}/versions/diff`, { query, ...options });
18
- }
19
- }
@@ -1,9 +0,0 @@
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 = exports.Rules = void 0;
6
- var rules_js_1 = require("./rules.cjs");
7
- Object.defineProperty(exports, "Rules", { enumerable: true, get: function () { return rules_js_1.Rules; } });
8
- var runs_js_1 = require("./runs.cjs");
9
- Object.defineProperty(exports, "Runs", { enumerable: true, get: function () { return runs_js_1.Runs; } });
@@ -1,2 +0,0 @@
1
- export { Rules } from './rules.js';
2
- export { Runs, type QueryRunResponse, type ResponseBodyForRunsGenerateQuery, type Run, type RunSchema, type RunStatsQueryParams, type RunTypeEnum, type RunsFilterDataSourceTypeEnum, type RunQueryV2Params, type RunRetrieveV2Params, type RunRetrieveParams, type RunQueryParams, type QueryRunResponsesItemsCursorPostPagination, } from './runs.js';
@@ -1,4 +0,0 @@
1
- // @ts-nocheck
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- export { Rules } from './rules.js';
4
- export { Runs, } from './runs.js';
@@ -1,9 +0,0 @@
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.Rules = void 0;
6
- const resource_js_1 = require("../../core/resource.cjs");
7
- class Rules extends resource_js_1.APIResource {
8
- }
9
- exports.Rules = Rules;
@@ -1,3 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- export declare class Rules extends APIResource {
3
- }
@@ -1,5 +0,0 @@
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
- export class Rules extends APIResource {
5
- }
@@ -1,115 +0,0 @@
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.Runs = void 0;
39
- const resource_js_1 = require("../../core/resource.cjs");
40
- const RulesAPI = __importStar(require("./rules.cjs"));
41
- const rules_js_1 = require("./rules.cjs");
42
- const pagination_js_1 = require("../../core/pagination.cjs");
43
- const headers_js_1 = require("../../internal/headers.cjs");
44
- const path_js_1 = require("../../internal/utils/path.cjs");
45
- class Runs extends resource_js_1.APIResource {
46
- constructor() {
47
- super(...arguments);
48
- Object.defineProperty(this, "rules", {
49
- enumerable: true,
50
- configurable: true,
51
- writable: true,
52
- value: new RulesAPI.Rules(this._client)
53
- });
54
- Object.defineProperty(this, "retrieve", {
55
- enumerable: true,
56
- configurable: true,
57
- writable: true,
58
- value: this.retrieveV2
59
- });
60
- Object.defineProperty(this, "query", {
61
- enumerable: true,
62
- configurable: true,
63
- writable: true,
64
- value: this.queryV2
65
- });
66
- }
67
- /**
68
- * **Alpha:** The request and response contract may change; Returns a paginated
69
- * list of runs for the given projects within min/max start_time. Supports filters,
70
- * cursor pagination, and `selects` to select fields to return.
71
- *
72
- * @example
73
- * ```ts
74
- * // Automatically fetches more pages as needed.
75
- * for await (const queryRunResponse of client.runs.queryV2()) {
76
- * // ...
77
- * }
78
- * ```
79
- */
80
- queryV2(params, options) {
81
- const { Accept, ...body } = params;
82
- return this._client.getAPIList('/v2/runs/query', (pagination_js_1.ItemsCursorPostPagination), {
83
- body,
84
- method: 'post',
85
- ...options,
86
- headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
87
- });
88
- }
89
- /**
90
- * **Alpha:** The request and response contract may change; Returns one run by ID
91
- * for the given session and start_time. Use the `selects` query parameter
92
- * (repeatable) to select fields to return.
93
- *
94
- * @example
95
- * ```ts
96
- * const queryRunResponse = await client.runs.retrieveV2(
97
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
98
- * {
99
- * project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
100
- * start_time: '2019-12-27T18:11:19.117Z',
101
- * },
102
- * );
103
- * ```
104
- */
105
- retrieveV2(runID, params, options) {
106
- const { Accept, ...query } = params;
107
- return this._client.get((0, path_js_1.path) `/v2/runs/${runID}`, {
108
- query,
109
- ...options,
110
- headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
111
- });
112
- }
113
- }
114
- exports.Runs = Runs;
115
- Runs.Rules = rules_js_1.Rules;