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,374 @@
|
|
|
1
|
+
import { APIResource } from '../../core/resource.js';
|
|
2
|
+
import * as ComparativeAPI from './comparative.js';
|
|
3
|
+
import { Comparative, ComparativeCreateParams, ComparativeCreateResponse, ComparativeDeleteResponse, SimpleExperimentInfo, SortByComparativeExperimentColumn } from './comparative.js';
|
|
4
|
+
import * as ExperimentsAPI from './experiments.js';
|
|
5
|
+
import { ExperimentGroupedParams, ExperimentGroupedResponse, Experiments } from './experiments.js';
|
|
6
|
+
import * as GroupAPI from './group.js';
|
|
7
|
+
import { Group, GroupRunsParams, GroupRunsResponse } from './group.js';
|
|
8
|
+
import * as RunsAPI from './runs.js';
|
|
9
|
+
import { ExampleWithRunsCh, QueryExampleSchemaWithRuns, QueryFeedbackDelta, RunCreateParams, RunCreateResponse, RunDeltaParams, Runs, SessionFeedbackDelta, SortParamsForRunsComparisonView } from './runs.js';
|
|
10
|
+
import * as ShareAPI from './share.js';
|
|
11
|
+
import { DatasetShareSchema, Share, ShareCreateParams, ShareDeleteAllResponse } from './share.js';
|
|
12
|
+
import * as SplitsAPI from './splits.js';
|
|
13
|
+
import { SplitCreateParams, SplitCreateResponse, SplitRetrieveParams, SplitRetrieveResponse, Splits } from './splits.js';
|
|
14
|
+
import * as VersionsAPI from './versions.js';
|
|
15
|
+
import { VersionListParams, VersionRetrieveDiffParams, VersionRetrieveDiffResponse, Versions } from './versions.js';
|
|
16
|
+
import * as ExamplesAPI from '../examples/examples.js';
|
|
17
|
+
import * as FeedbackAPI from '../feedback/feedback.js';
|
|
18
|
+
import { APIPromise } from '../../core/api-promise.js';
|
|
19
|
+
import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
|
|
20
|
+
import { type Uploadable } from '../../core/uploads.js';
|
|
21
|
+
import { RequestOptions } from '../../internal/request-options.js';
|
|
22
|
+
export declare class Datasets extends APIResource {
|
|
23
|
+
versions: VersionsAPI.Versions;
|
|
24
|
+
runs: RunsAPI.Runs;
|
|
25
|
+
group: GroupAPI.Group;
|
|
26
|
+
experiments: ExperimentsAPI.Experiments;
|
|
27
|
+
share: ShareAPI.Share;
|
|
28
|
+
comparative: ComparativeAPI.Comparative;
|
|
29
|
+
splits: SplitsAPI.Splits;
|
|
30
|
+
/**
|
|
31
|
+
* Create a new dataset.
|
|
32
|
+
*/
|
|
33
|
+
create(body: DatasetCreateParams, options?: RequestOptions): APIPromise<Dataset>;
|
|
34
|
+
/**
|
|
35
|
+
* Get a specific dataset.
|
|
36
|
+
*/
|
|
37
|
+
retrieve(datasetID: string, options?: RequestOptions): APIPromise<Dataset>;
|
|
38
|
+
/**
|
|
39
|
+
* Update a specific dataset.
|
|
40
|
+
*/
|
|
41
|
+
update(datasetID: string, body: DatasetUpdateParams, options?: RequestOptions): APIPromise<DatasetUpdateResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Get all datasets by query params and owner.
|
|
44
|
+
*/
|
|
45
|
+
list(params?: DatasetListParams | null | undefined, options?: RequestOptions): PagePromise<DatasetsOffsetPaginationTopLevelArray, Dataset>;
|
|
46
|
+
/**
|
|
47
|
+
* Delete a specific dataset.
|
|
48
|
+
*/
|
|
49
|
+
delete(datasetID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
50
|
+
/**
|
|
51
|
+
* Clone a dataset.
|
|
52
|
+
*/
|
|
53
|
+
clone(body: DatasetCloneParams, options?: RequestOptions): APIPromise<DatasetCloneResponse>;
|
|
54
|
+
/**
|
|
55
|
+
* Download a dataset as CSV format.
|
|
56
|
+
*/
|
|
57
|
+
retrieveCsv(datasetID: string, query?: DatasetRetrieveCsvParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
|
|
58
|
+
/**
|
|
59
|
+
* Download a dataset as CSV format.
|
|
60
|
+
*/
|
|
61
|
+
retrieveJSONL(datasetID: string, query?: DatasetRetrieveJSONLParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
|
|
62
|
+
/**
|
|
63
|
+
* Download a dataset as OpenAI Evals Jsonl format.
|
|
64
|
+
*/
|
|
65
|
+
retrieveOpenAI(datasetID: string, query?: DatasetRetrieveOpenAIParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
|
|
66
|
+
/**
|
|
67
|
+
* Download a dataset as OpenAI Jsonl format.
|
|
68
|
+
*/
|
|
69
|
+
retrieveOpenAIFt(datasetID: string, query?: DatasetRetrieveOpenAIFtParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
|
|
70
|
+
/**
|
|
71
|
+
* Get dataset version by as_of or exact tag.
|
|
72
|
+
*/
|
|
73
|
+
retrieveVersion(datasetID: string, query?: DatasetRetrieveVersionParams | null | undefined, options?: RequestOptions): APIPromise<DatasetVersion>;
|
|
74
|
+
/**
|
|
75
|
+
* Set a tag on a dataset version.
|
|
76
|
+
*/
|
|
77
|
+
updateTags(datasetID: string, body: DatasetUpdateTagsParams, options?: RequestOptions): APIPromise<DatasetVersion>;
|
|
78
|
+
/**
|
|
79
|
+
* Create a new dataset from a CSV or JSONL file.
|
|
80
|
+
*/
|
|
81
|
+
upload(body: DatasetUploadParams, options?: RequestOptions): APIPromise<Dataset>;
|
|
82
|
+
}
|
|
83
|
+
export type DatasetsOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<Dataset>;
|
|
84
|
+
export type DatasetVersionsOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<DatasetVersion>;
|
|
85
|
+
/**
|
|
86
|
+
* Enum for dataset data types.
|
|
87
|
+
*/
|
|
88
|
+
export type DataType = 'kv' | 'llm' | 'chat';
|
|
89
|
+
/**
|
|
90
|
+
* Dataset schema.
|
|
91
|
+
*/
|
|
92
|
+
export interface Dataset {
|
|
93
|
+
id: string;
|
|
94
|
+
modified_at: string;
|
|
95
|
+
name: string;
|
|
96
|
+
session_count: number;
|
|
97
|
+
tenant_id: string;
|
|
98
|
+
baseline_experiment_id?: string | null;
|
|
99
|
+
created_at?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Enum for dataset data types.
|
|
102
|
+
*/
|
|
103
|
+
data_type?: DataType | null;
|
|
104
|
+
description?: string | null;
|
|
105
|
+
example_count?: number | null;
|
|
106
|
+
externally_managed?: boolean | null;
|
|
107
|
+
inputs_schema_definition?: {
|
|
108
|
+
[key: string]: unknown;
|
|
109
|
+
} | null;
|
|
110
|
+
last_session_start_time?: string | null;
|
|
111
|
+
metadata?: {
|
|
112
|
+
[key: string]: unknown;
|
|
113
|
+
} | null;
|
|
114
|
+
outputs_schema_definition?: {
|
|
115
|
+
[key: string]: unknown;
|
|
116
|
+
} | null;
|
|
117
|
+
transformations?: Array<DatasetTransformation> | null;
|
|
118
|
+
}
|
|
119
|
+
export interface DatasetTransformation {
|
|
120
|
+
path: Array<string>;
|
|
121
|
+
/**
|
|
122
|
+
* Enum for dataset transformation types. Ordering determines the order in which
|
|
123
|
+
* transformations are applied if there are multiple transformations on the same
|
|
124
|
+
* path.
|
|
125
|
+
*/
|
|
126
|
+
transformation_type: 'convert_to_openai_message' | 'convert_to_openai_tool' | 'remove_system_messages' | 'remove_extra_fields' | 'extract_tools_from_run';
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Dataset version schema.
|
|
130
|
+
*/
|
|
131
|
+
export interface DatasetVersion {
|
|
132
|
+
as_of: string;
|
|
133
|
+
tags?: Array<string> | null;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Schema used for creating feedback without run id or session id.
|
|
137
|
+
*/
|
|
138
|
+
export interface FeedbackCreateCoreSchema {
|
|
139
|
+
key: string;
|
|
140
|
+
id?: string;
|
|
141
|
+
comment?: string | null;
|
|
142
|
+
comparative_experiment_id?: string | null;
|
|
143
|
+
correction?: {
|
|
144
|
+
[key: string]: unknown;
|
|
145
|
+
} | string | null;
|
|
146
|
+
created_at?: string;
|
|
147
|
+
extra?: {
|
|
148
|
+
[key: string]: unknown;
|
|
149
|
+
} | null;
|
|
150
|
+
feedback_config?: FeedbackCreateCoreSchema.FeedbackConfig | null;
|
|
151
|
+
feedback_group_id?: string | null;
|
|
152
|
+
/**
|
|
153
|
+
* Feedback from the LangChainPlus App.
|
|
154
|
+
*/
|
|
155
|
+
feedback_source?: FeedbackAPI.AppFeedbackSource | FeedbackAPI.APIFeedbackSource | FeedbackAPI.ModelFeedbackSource | FeedbackAPI.AutoEvalFeedbackSource | null;
|
|
156
|
+
modified_at?: string;
|
|
157
|
+
score?: number | boolean | null;
|
|
158
|
+
value?: number | boolean | string | {
|
|
159
|
+
[key: string]: unknown;
|
|
160
|
+
} | null;
|
|
161
|
+
}
|
|
162
|
+
export declare namespace FeedbackCreateCoreSchema {
|
|
163
|
+
interface FeedbackConfig {
|
|
164
|
+
/**
|
|
165
|
+
* Enum for feedback types.
|
|
166
|
+
*/
|
|
167
|
+
type: 'continuous' | 'categorical' | 'freeform';
|
|
168
|
+
categories?: Array<FeedbackConfig.Category> | null;
|
|
169
|
+
max?: number | null;
|
|
170
|
+
min?: number | null;
|
|
171
|
+
}
|
|
172
|
+
namespace FeedbackConfig {
|
|
173
|
+
/**
|
|
174
|
+
* Specific value and label pair for feedback
|
|
175
|
+
*/
|
|
176
|
+
interface Category {
|
|
177
|
+
value: number;
|
|
178
|
+
label?: string | null;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
export interface Missing {
|
|
183
|
+
__missing__: '__missing__';
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Enum for available dataset columns to sort by.
|
|
187
|
+
*/
|
|
188
|
+
export type SortByDatasetColumn = 'name' | 'created_at' | 'last_session_start_time' | 'example_count' | 'session_count' | 'modified_at';
|
|
189
|
+
export interface DatasetUpdateResponse {
|
|
190
|
+
id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
tenant_id: string;
|
|
193
|
+
created_at?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Enum for dataset data types.
|
|
196
|
+
*/
|
|
197
|
+
data_type?: DataType | null;
|
|
198
|
+
description?: string | null;
|
|
199
|
+
externally_managed?: boolean | null;
|
|
200
|
+
inputs_schema_definition?: {
|
|
201
|
+
[key: string]: unknown;
|
|
202
|
+
} | null;
|
|
203
|
+
outputs_schema_definition?: {
|
|
204
|
+
[key: string]: unknown;
|
|
205
|
+
} | null;
|
|
206
|
+
transformations?: Array<DatasetTransformation> | null;
|
|
207
|
+
}
|
|
208
|
+
export type DatasetDeleteResponse = unknown;
|
|
209
|
+
export type DatasetCloneResponse = Array<{
|
|
210
|
+
[key: string]: unknown;
|
|
211
|
+
}>;
|
|
212
|
+
export type DatasetRetrieveCsvResponse = unknown;
|
|
213
|
+
export type DatasetRetrieveJSONLResponse = unknown;
|
|
214
|
+
export type DatasetRetrieveOpenAIResponse = unknown;
|
|
215
|
+
export type DatasetRetrieveOpenAIFtResponse = unknown;
|
|
216
|
+
export interface DatasetCreateParams {
|
|
217
|
+
name: string;
|
|
218
|
+
id?: string | null;
|
|
219
|
+
created_at?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Enum for dataset data types.
|
|
222
|
+
*/
|
|
223
|
+
data_type?: DataType;
|
|
224
|
+
description?: string | null;
|
|
225
|
+
externally_managed?: boolean | null;
|
|
226
|
+
extra?: {
|
|
227
|
+
[key: string]: unknown;
|
|
228
|
+
} | null;
|
|
229
|
+
inputs_schema_definition?: {
|
|
230
|
+
[key: string]: unknown;
|
|
231
|
+
} | null;
|
|
232
|
+
outputs_schema_definition?: {
|
|
233
|
+
[key: string]: unknown;
|
|
234
|
+
} | null;
|
|
235
|
+
tag_value_ids?: Array<string> | null;
|
|
236
|
+
transformations?: Array<DatasetTransformation> | null;
|
|
237
|
+
}
|
|
238
|
+
export interface DatasetUpdateParams {
|
|
239
|
+
baseline_experiment_id?: string | Missing | null;
|
|
240
|
+
description?: string | Missing | null;
|
|
241
|
+
inputs_schema_definition?: {
|
|
242
|
+
[key: string]: unknown;
|
|
243
|
+
} | Missing | null;
|
|
244
|
+
metadata?: {
|
|
245
|
+
[key: string]: unknown;
|
|
246
|
+
} | Missing | null;
|
|
247
|
+
name?: string | Missing | null;
|
|
248
|
+
outputs_schema_definition?: {
|
|
249
|
+
[key: string]: unknown;
|
|
250
|
+
} | Missing | null;
|
|
251
|
+
patch_examples?: {
|
|
252
|
+
[key: string]: DatasetUpdateParams.PatchExamples;
|
|
253
|
+
} | null;
|
|
254
|
+
transformations?: Array<DatasetTransformation> | Missing | null;
|
|
255
|
+
}
|
|
256
|
+
export declare namespace DatasetUpdateParams {
|
|
257
|
+
/**
|
|
258
|
+
* Update class for Example.
|
|
259
|
+
*/
|
|
260
|
+
interface PatchExamples {
|
|
261
|
+
attachments_operations?: ExamplesAPI.AttachmentsOperations | null;
|
|
262
|
+
dataset_id?: string | null;
|
|
263
|
+
inputs?: {
|
|
264
|
+
[key: string]: unknown;
|
|
265
|
+
} | null;
|
|
266
|
+
metadata?: {
|
|
267
|
+
[key: string]: unknown;
|
|
268
|
+
} | null;
|
|
269
|
+
outputs?: {
|
|
270
|
+
[key: string]: unknown;
|
|
271
|
+
} | null;
|
|
272
|
+
overwrite?: boolean;
|
|
273
|
+
split?: Array<string> | string | null;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
export interface DatasetListParams extends OffsetPaginationTopLevelArrayParams {
|
|
277
|
+
id?: Array<string> | null;
|
|
278
|
+
/**
|
|
279
|
+
* Enum for dataset data types.
|
|
280
|
+
*/
|
|
281
|
+
datatype?: Array<DataType> | DataType | null;
|
|
282
|
+
exclude?: Array<'example_count'> | null;
|
|
283
|
+
exclude_corrections_datasets?: boolean;
|
|
284
|
+
metadata?: string | null;
|
|
285
|
+
name?: string | null;
|
|
286
|
+
name_contains?: string | null;
|
|
287
|
+
/**
|
|
288
|
+
* Enum for available dataset columns to sort by.
|
|
289
|
+
*/
|
|
290
|
+
sort_by?: SortByDatasetColumn;
|
|
291
|
+
sort_by_desc?: boolean;
|
|
292
|
+
tag_value_id?: Array<string> | null;
|
|
293
|
+
}
|
|
294
|
+
export interface DatasetCloneParams {
|
|
295
|
+
source_dataset_id: string;
|
|
296
|
+
target_dataset_id: string;
|
|
297
|
+
/**
|
|
298
|
+
* Only modifications made on or before this time are included. If None, the latest
|
|
299
|
+
* version of the dataset is used.
|
|
300
|
+
*/
|
|
301
|
+
as_of?: (string & {}) | string | null;
|
|
302
|
+
examples?: Array<string>;
|
|
303
|
+
split?: string | Array<string> | null;
|
|
304
|
+
tag_value_ids?: Array<string> | null;
|
|
305
|
+
}
|
|
306
|
+
export interface DatasetRetrieveCsvParams {
|
|
307
|
+
/**
|
|
308
|
+
* Only modifications made on or before this time are included. If None, the latest
|
|
309
|
+
* version of the dataset is used.
|
|
310
|
+
*/
|
|
311
|
+
as_of?: string | null;
|
|
312
|
+
}
|
|
313
|
+
export interface DatasetRetrieveJSONLParams {
|
|
314
|
+
/**
|
|
315
|
+
* Only modifications made on or before this time are included. If None, the latest
|
|
316
|
+
* version of the dataset is used.
|
|
317
|
+
*/
|
|
318
|
+
as_of?: string | null;
|
|
319
|
+
}
|
|
320
|
+
export interface DatasetRetrieveOpenAIParams {
|
|
321
|
+
/**
|
|
322
|
+
* Only modifications made on or before this time are included. If None, the latest
|
|
323
|
+
* version of the dataset is used.
|
|
324
|
+
*/
|
|
325
|
+
as_of?: string | null;
|
|
326
|
+
}
|
|
327
|
+
export interface DatasetRetrieveOpenAIFtParams {
|
|
328
|
+
/**
|
|
329
|
+
* Only modifications made on or before this time are included. If None, the latest
|
|
330
|
+
* version of the dataset is used.
|
|
331
|
+
*/
|
|
332
|
+
as_of?: string | null;
|
|
333
|
+
}
|
|
334
|
+
export interface DatasetRetrieveVersionParams {
|
|
335
|
+
as_of?: string | null;
|
|
336
|
+
tag?: string | null;
|
|
337
|
+
}
|
|
338
|
+
export interface DatasetUpdateTagsParams {
|
|
339
|
+
/**
|
|
340
|
+
* Only modifications made on or before this time are included. If None, the latest
|
|
341
|
+
* version of the dataset is used.
|
|
342
|
+
*/
|
|
343
|
+
as_of: (string & {}) | string;
|
|
344
|
+
tag: string;
|
|
345
|
+
}
|
|
346
|
+
export interface DatasetUploadParams {
|
|
347
|
+
file: Uploadable;
|
|
348
|
+
input_keys: Array<string>;
|
|
349
|
+
/**
|
|
350
|
+
* Enum for dataset data types.
|
|
351
|
+
*/
|
|
352
|
+
data_type?: DataType;
|
|
353
|
+
description?: string | null;
|
|
354
|
+
input_key_mappings?: string | null;
|
|
355
|
+
inputs_schema_definition?: string | null;
|
|
356
|
+
metadata_key_mappings?: string | null;
|
|
357
|
+
metadata_keys?: Array<string>;
|
|
358
|
+
name?: string | null;
|
|
359
|
+
output_key_mappings?: string | null;
|
|
360
|
+
output_keys?: Array<string>;
|
|
361
|
+
outputs_schema_definition?: string | null;
|
|
362
|
+
tag_value_ids?: string | null;
|
|
363
|
+
transformations?: string | null;
|
|
364
|
+
}
|
|
365
|
+
export declare namespace Datasets {
|
|
366
|
+
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, type DatasetUpdateResponse as DatasetUpdateResponse, type DatasetDeleteResponse as DatasetDeleteResponse, type DatasetCloneResponse as DatasetCloneResponse, type DatasetRetrieveCsvResponse as DatasetRetrieveCsvResponse, type DatasetRetrieveJSONLResponse as DatasetRetrieveJSONLResponse, type DatasetRetrieveOpenAIResponse as DatasetRetrieveOpenAIResponse, type DatasetRetrieveOpenAIFtResponse as DatasetRetrieveOpenAIFtResponse, type DatasetsOffsetPaginationTopLevelArray as DatasetsOffsetPaginationTopLevelArray, type DatasetCreateParams as DatasetCreateParams, type DatasetUpdateParams as DatasetUpdateParams, type DatasetListParams as DatasetListParams, type DatasetCloneParams as DatasetCloneParams, type DatasetRetrieveCsvParams as DatasetRetrieveCsvParams, type DatasetRetrieveJSONLParams as DatasetRetrieveJSONLParams, type DatasetRetrieveOpenAIParams as DatasetRetrieveOpenAIParams, type DatasetRetrieveOpenAIFtParams as DatasetRetrieveOpenAIFtParams, type DatasetRetrieveVersionParams as DatasetRetrieveVersionParams, type DatasetUpdateTagsParams as DatasetUpdateTagsParams, type DatasetUploadParams as DatasetUploadParams, };
|
|
367
|
+
export { Versions as Versions, type VersionRetrieveDiffResponse as VersionRetrieveDiffResponse, type VersionListParams as VersionListParams, type VersionRetrieveDiffParams as VersionRetrieveDiffParams, };
|
|
368
|
+
export { Runs as Runs, type ExampleWithRunsCh as ExampleWithRunsCh, type QueryExampleSchemaWithRuns as QueryExampleSchemaWithRuns, type QueryFeedbackDelta as QueryFeedbackDelta, type SessionFeedbackDelta as SessionFeedbackDelta, type SortParamsForRunsComparisonView as SortParamsForRunsComparisonView, type RunCreateResponse as RunCreateResponse, type RunCreateParams as RunCreateParams, type RunDeltaParams as RunDeltaParams, };
|
|
369
|
+
export { Group as Group, type GroupRunsResponse as GroupRunsResponse, type GroupRunsParams as GroupRunsParams, };
|
|
370
|
+
export { Experiments as Experiments, type ExperimentGroupedResponse as ExperimentGroupedResponse, type ExperimentGroupedParams as ExperimentGroupedParams, };
|
|
371
|
+
export { Share as Share, type DatasetShareSchema as DatasetShareSchema, type ShareDeleteAllResponse as ShareDeleteAllResponse, type ShareCreateParams as ShareCreateParams, };
|
|
372
|
+
export { Comparative as Comparative, type SimpleExperimentInfo as SimpleExperimentInfo, type SortByComparativeExperimentColumn as SortByComparativeExperimentColumn, type ComparativeCreateResponse as ComparativeCreateResponse, type ComparativeDeleteResponse as ComparativeDeleteResponse, type ComparativeCreateParams as ComparativeCreateParams, };
|
|
373
|
+
export { Splits as Splits, type SplitCreateResponse as SplitCreateResponse, type SplitRetrieveResponse as SplitRetrieveResponse, type SplitCreateParams as SplitCreateParams, type SplitRetrieveParams as SplitRetrieveParams, };
|
|
374
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
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 ComparativeAPI from './comparative.js';
|
|
5
|
+
import { Comparative, } from './comparative.js';
|
|
6
|
+
import * as ExperimentsAPI from './experiments.js';
|
|
7
|
+
import { Experiments } from './experiments.js';
|
|
8
|
+
import * as GroupAPI from './group.js';
|
|
9
|
+
import { Group } from './group.js';
|
|
10
|
+
import * as RunsAPI from './runs.js';
|
|
11
|
+
import { Runs, } from './runs.js';
|
|
12
|
+
import * as ShareAPI from './share.js';
|
|
13
|
+
import { Share } from './share.js';
|
|
14
|
+
import * as SplitsAPI from './splits.js';
|
|
15
|
+
import { Splits, } from './splits.js';
|
|
16
|
+
import * as VersionsAPI from './versions.js';
|
|
17
|
+
import { Versions, } from './versions.js';
|
|
18
|
+
import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
|
|
19
|
+
import { multipartFormRequestOptions } from '../../internal/uploads.js';
|
|
20
|
+
import { path } from '../../internal/utils/path.js';
|
|
21
|
+
export class Datasets extends APIResource {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
Object.defineProperty(this, "versions", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
writable: true,
|
|
28
|
+
value: new VersionsAPI.Versions(this._client)
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(this, "runs", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true,
|
|
34
|
+
value: new RunsAPI.Runs(this._client)
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(this, "group", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
configurable: true,
|
|
39
|
+
writable: true,
|
|
40
|
+
value: new GroupAPI.Group(this._client)
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(this, "experiments", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
configurable: true,
|
|
45
|
+
writable: true,
|
|
46
|
+
value: new ExperimentsAPI.Experiments(this._client)
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(this, "share", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
configurable: true,
|
|
51
|
+
writable: true,
|
|
52
|
+
value: new ShareAPI.Share(this._client)
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(this, "comparative", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
configurable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
value: new ComparativeAPI.Comparative(this._client)
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(this, "splits", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
configurable: true,
|
|
63
|
+
writable: true,
|
|
64
|
+
value: new SplitsAPI.Splits(this._client)
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Create a new dataset.
|
|
69
|
+
*/
|
|
70
|
+
create(body, options) {
|
|
71
|
+
return this._client.post('/api/v1/datasets', { body, ...options });
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Get a specific dataset.
|
|
75
|
+
*/
|
|
76
|
+
retrieve(datasetID, options) {
|
|
77
|
+
return this._client.get(path `/api/v1/datasets/${datasetID}`, options);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Update a specific dataset.
|
|
81
|
+
*/
|
|
82
|
+
update(datasetID, body, options) {
|
|
83
|
+
return this._client.patch(path `/api/v1/datasets/${datasetID}`, { body, ...options });
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Get all datasets by query params and owner.
|
|
87
|
+
*/
|
|
88
|
+
list(params = {}, options) {
|
|
89
|
+
const { datatype, ...query } = params ?? {};
|
|
90
|
+
return this._client.getAPIList('/api/v1/datasets', (OffsetPaginationTopLevelArray), {
|
|
91
|
+
query: { data_type: datatype, ...query },
|
|
92
|
+
...options,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Delete a specific dataset.
|
|
97
|
+
*/
|
|
98
|
+
delete(datasetID, options) {
|
|
99
|
+
return this._client.delete(path `/api/v1/datasets/${datasetID}`, options);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Clone a dataset.
|
|
103
|
+
*/
|
|
104
|
+
clone(body, options) {
|
|
105
|
+
return this._client.post('/api/v1/datasets/clone', { body, ...options });
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Download a dataset as CSV format.
|
|
109
|
+
*/
|
|
110
|
+
retrieveCsv(datasetID, query = {}, options) {
|
|
111
|
+
return this._client.get(path `/api/v1/datasets/${datasetID}/csv`, { query, ...options });
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Download a dataset as CSV format.
|
|
115
|
+
*/
|
|
116
|
+
retrieveJSONL(datasetID, query = {}, options) {
|
|
117
|
+
return this._client.get(path `/api/v1/datasets/${datasetID}/jsonl`, { query, ...options });
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Download a dataset as OpenAI Evals Jsonl format.
|
|
121
|
+
*/
|
|
122
|
+
retrieveOpenAI(datasetID, query = {}, options) {
|
|
123
|
+
return this._client.get(path `/api/v1/datasets/${datasetID}/openai`, { query, ...options });
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Download a dataset as OpenAI Jsonl format.
|
|
127
|
+
*/
|
|
128
|
+
retrieveOpenAIFt(datasetID, query = {}, options) {
|
|
129
|
+
return this._client.get(path `/api/v1/datasets/${datasetID}/openai_ft`, { query, ...options });
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Get dataset version by as_of or exact tag.
|
|
133
|
+
*/
|
|
134
|
+
retrieveVersion(datasetID, query = {}, options) {
|
|
135
|
+
return this._client.get(path `/api/v1/datasets/${datasetID}/version`, { query, ...options });
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Set a tag on a dataset version.
|
|
139
|
+
*/
|
|
140
|
+
updateTags(datasetID, body, options) {
|
|
141
|
+
return this._client.put(path `/api/v1/datasets/${datasetID}/tags`, { body, ...options });
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Create a new dataset from a CSV or JSONL file.
|
|
145
|
+
*/
|
|
146
|
+
upload(body, options) {
|
|
147
|
+
return this._client.post('/api/v1/datasets/upload', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
Datasets.Versions = Versions;
|
|
151
|
+
Datasets.Runs = Runs;
|
|
152
|
+
Datasets.Group = Group;
|
|
153
|
+
Datasets.Experiments = Experiments;
|
|
154
|
+
Datasets.Share = Share;
|
|
155
|
+
Datasets.Comparative = Comparative;
|
|
156
|
+
Datasets.Splits = Splits;
|
|
@@ -0,0 +1,16 @@
|
|
|
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.Experiments = void 0;
|
|
6
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
7
|
+
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
8
|
+
class Experiments extends resource_js_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Stream grouped and aggregated experiments.
|
|
11
|
+
*/
|
|
12
|
+
grouped(datasetID, body, options) {
|
|
13
|
+
return this._client.post((0, path_js_1.path) `/api/v1/datasets/${datasetID}/experiments/grouped`, { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.Experiments = Experiments;
|
|
@@ -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 Experiments extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Stream grouped and aggregated experiments.
|
|
7
|
+
*/
|
|
8
|
+
grouped(datasetID: string, body: ExperimentGroupedParams, options?: RequestOptions): APIPromise<unknown>;
|
|
9
|
+
}
|
|
10
|
+
export type ExperimentGroupedResponse = unknown;
|
|
11
|
+
export interface ExperimentGroupedParams {
|
|
12
|
+
metadata_keys: Array<string>;
|
|
13
|
+
dataset_version?: string | null;
|
|
14
|
+
experiment_limit?: number;
|
|
15
|
+
filter?: string | null;
|
|
16
|
+
name_contains?: string | null;
|
|
17
|
+
stats_start_time?: string | null;
|
|
18
|
+
tag_value_id?: Array<string> | null;
|
|
19
|
+
use_approx_stats?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace Experiments {
|
|
22
|
+
export { type ExperimentGroupedResponse as ExperimentGroupedResponse, type ExperimentGroupedParams as ExperimentGroupedParams, };
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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 Experiments extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Stream grouped and aggregated experiments.
|
|
8
|
+
*/
|
|
9
|
+
grouped(datasetID, body, options) {
|
|
10
|
+
return this._client.post(path `/api/v1/datasets/${datasetID}/experiments/grouped`, { body, ...options });
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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.Group = void 0;
|
|
6
|
+
const resource_js_1 = require("../../core/resource.cjs");
|
|
7
|
+
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
8
|
+
class Group extends resource_js_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Fetch examples for a dataset, and fetch the runs for each example if they are
|
|
11
|
+
* associated with the given session_ids.
|
|
12
|
+
*/
|
|
13
|
+
runs(datasetID, body, options) {
|
|
14
|
+
return this._client.post((0, path_js_1.path) `/api/v1/datasets/${datasetID}/group/runs`, { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.Group = Group;
|