langsmith 0.7.10 → 0.7.12
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 +46 -15
- package/dist/_openapi_client/client.cjs +0 -80
- package/dist/_openapi_client/client.d.ts +2 -32
- package/dist/_openapi_client/client.js +0 -80
- package/dist/_openapi_client/core/pagination.cjs +2 -2
- package/dist/_openapi_client/core/pagination.js +2 -2
- package/dist/_openapi_client/internal/utils/query.cjs +1 -1
- package/dist/_openapi_client/internal/utils/query.js +1 -1
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +52 -4
- package/dist/_openapi_client/resources/index.cjs +1 -21
- package/dist/_openapi_client/resources/index.d.ts +1 -11
- package/dist/_openapi_client/resources/index.js +0 -10
- package/dist/_openapi_client/resources/runs/index.cjs +9 -0
- package/dist/_openapi_client/resources/runs/index.d.ts +2 -0
- package/dist/_openapi_client/resources/runs/index.js +4 -0
- package/dist/_openapi_client/resources/runs/runs.cjs +54 -41
- package/dist/_openapi_client/resources/runs/runs.d.ts +571 -313
- package/dist/_openapi_client/resources/runs/runs.js +54 -41
- package/dist/_openapi_client/resources/runs.cjs +19 -0
- package/dist/_openapi_client/resources/runs.d.ts +1 -0
- package/dist/_openapi_client/resources/runs.js +3 -0
- package/dist/anonymizer/index.cjs +142 -0
- package/dist/anonymizer/index.d.ts +45 -0
- package/dist/anonymizer/index.js +140 -0
- package/dist/client.cjs +29 -1
- package/dist/client.d.ts +6 -1
- package/dist/client.js +28 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/client.cjs +5 -8
- package/dist/sandbox/client.js +5 -8
- package/dist/sandbox/index.cjs +2 -1
- package/dist/sandbox/index.d.ts +2 -2
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/mounts.cjs +157 -18
- package/dist/sandbox/mounts.d.ts +10 -2
- package/dist/sandbox/mounts.js +155 -18
- package/dist/sandbox/proxy_config.cjs +19 -44
- package/dist/sandbox/proxy_config.d.ts +2 -4
- package/dist/sandbox/proxy_config.js +19 -43
- package/dist/sandbox/types.d.ts +56 -15
- package/dist/utils/constants.cjs +4 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +1 -0
- package/package.json +5 -5
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +0 -138
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +0 -367
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +0 -101
- package/dist/_openapi_client/resources/annotation-queues/runs.cjs +0 -46
- package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +0 -128
- package/dist/_openapi_client/resources/annotation-queues/runs.js +0 -42
- package/dist/_openapi_client/resources/commits.cjs +0 -44
- package/dist/_openapi_client/resources/commits.d.ts +0 -204
- package/dist/_openapi_client/resources/commits.js +0 -40
- package/dist/_openapi_client/resources/evaluators.cjs +0 -15
- package/dist/_openapi_client/resources/evaluators.d.ts +0 -125
- package/dist/_openapi_client/resources/evaluators.js +0 -11
- package/dist/_openapi_client/resources/examples/bulk.cjs +0 -24
- package/dist/_openapi_client/resources/examples/bulk.d.ts +0 -78
- package/dist/_openapi_client/resources/examples/bulk.js +0 -20
- package/dist/_openapi_client/resources/examples/examples.cjs +0 -124
- package/dist/_openapi_client/resources/examples/examples.d.ts +0 -182
- package/dist/_openapi_client/resources/examples/examples.js +0 -87
- package/dist/_openapi_client/resources/examples/validate.cjs +0 -21
- package/dist/_openapi_client/resources/examples/validate.d.ts +0 -38
- package/dist/_openapi_client/resources/examples/validate.js +0 -17
- package/dist/_openapi_client/resources/feedback/configs.cjs +0 -24
- package/dist/_openapi_client/resources/feedback/configs.d.ts +0 -18
- package/dist/_openapi_client/resources/feedback/configs.js +0 -20
- package/dist/_openapi_client/resources/feedback/feedback.cjs +0 -98
- package/dist/_openapi_client/resources/feedback/feedback.d.ts +0 -275
- package/dist/_openapi_client/resources/feedback/feedback.js +0 -61
- package/dist/_openapi_client/resources/feedback/tokens.cjs +0 -35
- package/dist/_openapi_client/resources/feedback/tokens.d.ts +0 -130
- package/dist/_openapi_client/resources/feedback/tokens.js +0 -31
- package/dist/_openapi_client/resources/public/datasets.cjs +0 -47
- package/dist/_openapi_client/resources/public/datasets.d.ts +0 -152
- package/dist/_openapi_client/resources/public/datasets.js +0 -43
- package/dist/_openapi_client/resources/public/public.cjs +0 -62
- package/dist/_openapi_client/resources/public/public.d.ts +0 -32
- package/dist/_openapi_client/resources/public/public.js +0 -25
- package/dist/_openapi_client/resources/repos/directories.cjs +0 -40
- package/dist/_openapi_client/resources/repos/directories.d.ts +0 -72
- package/dist/_openapi_client/resources/repos/directories.js +0 -36
- package/dist/_openapi_client/resources/repos/repos.cjs +0 -93
- package/dist/_openapi_client/resources/repos/repos.d.ts +0 -188
- package/dist/_openapi_client/resources/repos/repos.js +0 -56
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +0 -86
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +0 -1121
- package/dist/_openapi_client/resources/sandboxes/boxes.js +0 -82
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +0 -63
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +0 -13
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +0 -26
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +0 -39
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +0 -130
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +0 -35
- package/dist/_openapi_client/resources/settings.cjs +0 -15
- package/dist/_openapi_client/resources/settings.d.ts +0 -18
- package/dist/_openapi_client/resources/settings.js +0 -11
- package/dist/_openapi_client/resources/workspaces.cjs +0 -35
- package/dist/_openapi_client/resources/workspaces.d.ts +0 -84
- package/dist/_openapi_client/resources/workspaces.js +0 -31
|
@@ -1,98 +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.Feedback = void 0;
|
|
39
|
-
const resource_js_1 = require("../../core/resource.cjs");
|
|
40
|
-
const ConfigsAPI = __importStar(require("./configs.cjs"));
|
|
41
|
-
const configs_js_1 = require("./configs.cjs");
|
|
42
|
-
const TokensAPI = __importStar(require("./tokens.cjs"));
|
|
43
|
-
const tokens_js_1 = require("./tokens.cjs");
|
|
44
|
-
const pagination_js_1 = require("../../core/pagination.cjs");
|
|
45
|
-
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
46
|
-
class Feedback extends resource_js_1.APIResource {
|
|
47
|
-
constructor() {
|
|
48
|
-
super(...arguments);
|
|
49
|
-
Object.defineProperty(this, "tokens", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
configurable: true,
|
|
52
|
-
writable: true,
|
|
53
|
-
value: new TokensAPI.Tokens(this._client)
|
|
54
|
-
});
|
|
55
|
-
Object.defineProperty(this, "configs", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
configurable: true,
|
|
58
|
-
writable: true,
|
|
59
|
-
value: new ConfigsAPI.Configs(this._client)
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Create a new feedback.
|
|
64
|
-
*/
|
|
65
|
-
create(body, options) {
|
|
66
|
-
return this._client.post('/api/v1/feedback', { body, ...options });
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Get a specific feedback.
|
|
70
|
-
*/
|
|
71
|
-
retrieve(feedbackID, query = {}, options) {
|
|
72
|
-
return this._client.get((0, path_js_1.path) `/api/v1/feedback/${feedbackID}`, { query, ...options });
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Replace an existing feedback entry with a new, modified entry.
|
|
76
|
-
*/
|
|
77
|
-
update(feedbackID, body, options) {
|
|
78
|
-
return this._client.patch((0, path_js_1.path) `/api/v1/feedback/${feedbackID}`, { body, ...options });
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* List all Feedback by query params.
|
|
82
|
-
*/
|
|
83
|
-
list(query = {}, options) {
|
|
84
|
-
return this._client.getAPIList('/api/v1/feedback', (pagination_js_1.OffsetPaginationTopLevelArray), {
|
|
85
|
-
query,
|
|
86
|
-
...options,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Delete a feedback.
|
|
91
|
-
*/
|
|
92
|
-
delete(feedbackID, options) {
|
|
93
|
-
return this._client.delete((0, path_js_1.path) `/api/v1/feedback/${feedbackID}`, options);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.Feedback = Feedback;
|
|
97
|
-
Feedback.Tokens = tokens_js_1.Tokens;
|
|
98
|
-
Feedback.Configs = configs_js_1.Configs;
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { APIResource } from '../../core/resource.js';
|
|
2
|
-
import * as ConfigsAPI from './configs.js';
|
|
3
|
-
import { ConfigDeleteParams, Configs } from './configs.js';
|
|
4
|
-
import * as TokensAPI from './tokens.js';
|
|
5
|
-
import { FeedbackIngestTokenCreateSchema, FeedbackIngestTokenSchema, TokenCreateParams, TokenCreateResponse, TokenListParams, TokenListResponse, TokenRetrieveParams, TokenRetrieveResponse, TokenUpdateParams, TokenUpdateResponse, Tokens } from './tokens.js';
|
|
6
|
-
import { APIPromise } from '../../core/api-promise.js';
|
|
7
|
-
import { OffsetPaginationTopLevelArray, type OffsetPaginationTopLevelArrayParams, PagePromise } from '../../core/pagination.js';
|
|
8
|
-
import { RequestOptions } from '../../internal/request-options.js';
|
|
9
|
-
export declare class Feedback extends APIResource {
|
|
10
|
-
tokens: TokensAPI.Tokens;
|
|
11
|
-
configs: ConfigsAPI.Configs;
|
|
12
|
-
/**
|
|
13
|
-
* Create a new feedback.
|
|
14
|
-
*/
|
|
15
|
-
create(body: FeedbackCreateParams, options?: RequestOptions): APIPromise<FeedbackSchema>;
|
|
16
|
-
/**
|
|
17
|
-
* Get a specific feedback.
|
|
18
|
-
*/
|
|
19
|
-
retrieve(feedbackID: string, query?: FeedbackRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<FeedbackSchema>;
|
|
20
|
-
/**
|
|
21
|
-
* Replace an existing feedback entry with a new, modified entry.
|
|
22
|
-
*/
|
|
23
|
-
update(feedbackID: string, body: FeedbackUpdateParams, options?: RequestOptions): APIPromise<FeedbackSchema>;
|
|
24
|
-
/**
|
|
25
|
-
* List all Feedback by query params.
|
|
26
|
-
*/
|
|
27
|
-
list(query?: FeedbackListParams | null | undefined, options?: RequestOptions): PagePromise<FeedbackSchemasOffsetPaginationTopLevelArray, FeedbackSchema>;
|
|
28
|
-
/**
|
|
29
|
-
* Delete a feedback.
|
|
30
|
-
*/
|
|
31
|
-
delete(feedbackID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
32
|
-
}
|
|
33
|
-
export type FeedbackSchemasOffsetPaginationTopLevelArray = OffsetPaginationTopLevelArray<FeedbackSchema>;
|
|
34
|
-
/**
|
|
35
|
-
* API feedback source.
|
|
36
|
-
*/
|
|
37
|
-
export interface APIFeedbackSource {
|
|
38
|
-
metadata?: {
|
|
39
|
-
[key: string]: unknown;
|
|
40
|
-
} | null;
|
|
41
|
-
type?: 'api';
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Feedback from the LangChainPlus App.
|
|
45
|
-
*/
|
|
46
|
-
export interface AppFeedbackSource {
|
|
47
|
-
metadata?: {
|
|
48
|
-
[key: string]: unknown;
|
|
49
|
-
} | null;
|
|
50
|
-
type?: 'app';
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Auto eval feedback source.
|
|
54
|
-
*/
|
|
55
|
-
export interface AutoEvalFeedbackSource {
|
|
56
|
-
metadata?: {
|
|
57
|
-
[key: string]: unknown;
|
|
58
|
-
} | null;
|
|
59
|
-
type?: 'auto_eval';
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Schema used for creating feedback.
|
|
63
|
-
*/
|
|
64
|
-
export interface FeedbackCreateSchema {
|
|
65
|
-
key: string;
|
|
66
|
-
id?: string;
|
|
67
|
-
comment?: string | null;
|
|
68
|
-
comparative_experiment_id?: string | null;
|
|
69
|
-
correction?: {
|
|
70
|
-
[key: string]: unknown;
|
|
71
|
-
} | string | null;
|
|
72
|
-
created_at?: string;
|
|
73
|
-
error?: boolean | null;
|
|
74
|
-
feedback_config?: FeedbackCreateSchema.FeedbackConfig | null;
|
|
75
|
-
feedback_group_id?: string | null;
|
|
76
|
-
/**
|
|
77
|
-
* Feedback from the LangChainPlus App.
|
|
78
|
-
*/
|
|
79
|
-
feedback_source?: AppFeedbackSource | APIFeedbackSource | ModelFeedbackSource | AutoEvalFeedbackSource | null;
|
|
80
|
-
modified_at?: string;
|
|
81
|
-
run_id?: string | null;
|
|
82
|
-
score?: number | boolean | null;
|
|
83
|
-
session_id?: string | null;
|
|
84
|
-
start_time?: string | null;
|
|
85
|
-
trace_id?: string | null;
|
|
86
|
-
value?: number | boolean | string | {
|
|
87
|
-
[key: string]: unknown;
|
|
88
|
-
} | null;
|
|
89
|
-
}
|
|
90
|
-
export declare namespace FeedbackCreateSchema {
|
|
91
|
-
interface FeedbackConfig {
|
|
92
|
-
/**
|
|
93
|
-
* Enum for feedback types.
|
|
94
|
-
*/
|
|
95
|
-
type: 'continuous' | 'categorical' | 'freeform';
|
|
96
|
-
categories?: Array<FeedbackConfig.Category> | null;
|
|
97
|
-
max?: number | null;
|
|
98
|
-
min?: number | null;
|
|
99
|
-
}
|
|
100
|
-
namespace FeedbackConfig {
|
|
101
|
-
/**
|
|
102
|
-
* Specific value and label pair for feedback
|
|
103
|
-
*/
|
|
104
|
-
interface Category {
|
|
105
|
-
value: number;
|
|
106
|
-
label?: string | null;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Enum for feedback levels.
|
|
112
|
-
*/
|
|
113
|
-
export type FeedbackLevel = 'run' | 'session';
|
|
114
|
-
/**
|
|
115
|
-
* Schema for getting feedback.
|
|
116
|
-
*/
|
|
117
|
-
export interface FeedbackSchema {
|
|
118
|
-
id: string;
|
|
119
|
-
key: string;
|
|
120
|
-
comment?: string | null;
|
|
121
|
-
comparative_experiment_id?: string | null;
|
|
122
|
-
correction?: {
|
|
123
|
-
[key: string]: unknown;
|
|
124
|
-
} | string | null;
|
|
125
|
-
created_at?: string;
|
|
126
|
-
extra?: {
|
|
127
|
-
[key: string]: unknown;
|
|
128
|
-
} | null;
|
|
129
|
-
feedback_group_id?: string | null;
|
|
130
|
-
/**
|
|
131
|
-
* The feedback source loaded from the database.
|
|
132
|
-
*/
|
|
133
|
-
feedback_source?: FeedbackSchema.FeedbackSource | null;
|
|
134
|
-
feedback_thread_id?: string | null;
|
|
135
|
-
is_root?: boolean;
|
|
136
|
-
modified_at?: string;
|
|
137
|
-
run_id?: string | null;
|
|
138
|
-
score?: number | boolean | null;
|
|
139
|
-
session_id?: string | null;
|
|
140
|
-
start_time?: string | null;
|
|
141
|
-
trace_id?: string | null;
|
|
142
|
-
value?: number | boolean | string | {
|
|
143
|
-
[key: string]: unknown;
|
|
144
|
-
} | null;
|
|
145
|
-
}
|
|
146
|
-
export declare namespace FeedbackSchema {
|
|
147
|
-
/**
|
|
148
|
-
* The feedback source loaded from the database.
|
|
149
|
-
*/
|
|
150
|
-
interface FeedbackSource {
|
|
151
|
-
ls_user_id?: string | null;
|
|
152
|
-
metadata?: {
|
|
153
|
-
[key: string]: unknown;
|
|
154
|
-
} | null;
|
|
155
|
-
type?: string | null;
|
|
156
|
-
user_id?: string | null;
|
|
157
|
-
user_name?: string | null;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Model feedback source.
|
|
162
|
-
*/
|
|
163
|
-
export interface ModelFeedbackSource {
|
|
164
|
-
metadata?: {
|
|
165
|
-
[key: string]: unknown;
|
|
166
|
-
} | null;
|
|
167
|
-
type?: 'model';
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Enum for feedback source types.
|
|
171
|
-
*/
|
|
172
|
-
export type SourceType = 'api' | 'model' | 'app' | 'auto_eval';
|
|
173
|
-
export type FeedbackDeleteResponse = unknown;
|
|
174
|
-
export interface FeedbackCreateParams {
|
|
175
|
-
key: string;
|
|
176
|
-
id?: string;
|
|
177
|
-
comment?: string | null;
|
|
178
|
-
comparative_experiment_id?: string | null;
|
|
179
|
-
correction?: {
|
|
180
|
-
[key: string]: unknown;
|
|
181
|
-
} | string | null;
|
|
182
|
-
created_at?: string;
|
|
183
|
-
error?: boolean | null;
|
|
184
|
-
feedback_config?: FeedbackCreateParams.FeedbackConfig | null;
|
|
185
|
-
feedback_group_id?: string | null;
|
|
186
|
-
/**
|
|
187
|
-
* Feedback from the LangChainPlus App.
|
|
188
|
-
*/
|
|
189
|
-
feedback_source?: AppFeedbackSource | APIFeedbackSource | ModelFeedbackSource | AutoEvalFeedbackSource | null;
|
|
190
|
-
modified_at?: string;
|
|
191
|
-
run_id?: string | null;
|
|
192
|
-
score?: number | boolean | null;
|
|
193
|
-
session_id?: string | null;
|
|
194
|
-
start_time?: string | null;
|
|
195
|
-
trace_id?: string | null;
|
|
196
|
-
value?: number | boolean | string | {
|
|
197
|
-
[key: string]: unknown;
|
|
198
|
-
} | null;
|
|
199
|
-
}
|
|
200
|
-
export declare namespace FeedbackCreateParams {
|
|
201
|
-
interface FeedbackConfig {
|
|
202
|
-
/**
|
|
203
|
-
* Enum for feedback types.
|
|
204
|
-
*/
|
|
205
|
-
type: 'continuous' | 'categorical' | 'freeform';
|
|
206
|
-
categories?: Array<FeedbackConfig.Category> | null;
|
|
207
|
-
max?: number | null;
|
|
208
|
-
min?: number | null;
|
|
209
|
-
}
|
|
210
|
-
namespace FeedbackConfig {
|
|
211
|
-
/**
|
|
212
|
-
* Specific value and label pair for feedback
|
|
213
|
-
*/
|
|
214
|
-
interface Category {
|
|
215
|
-
value: number;
|
|
216
|
-
label?: string | null;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
export interface FeedbackRetrieveParams {
|
|
221
|
-
include_user_names?: boolean | null;
|
|
222
|
-
}
|
|
223
|
-
export interface FeedbackUpdateParams {
|
|
224
|
-
comment?: string | null;
|
|
225
|
-
correction?: {
|
|
226
|
-
[key: string]: unknown;
|
|
227
|
-
} | string | null;
|
|
228
|
-
feedback_config?: FeedbackUpdateParams.FeedbackConfig | null;
|
|
229
|
-
score?: number | boolean | null;
|
|
230
|
-
value?: number | boolean | string | {
|
|
231
|
-
[key: string]: unknown;
|
|
232
|
-
} | null;
|
|
233
|
-
}
|
|
234
|
-
export declare namespace FeedbackUpdateParams {
|
|
235
|
-
interface FeedbackConfig {
|
|
236
|
-
/**
|
|
237
|
-
* Enum for feedback types.
|
|
238
|
-
*/
|
|
239
|
-
type: 'continuous' | 'categorical' | 'freeform';
|
|
240
|
-
categories?: Array<FeedbackConfig.Category> | null;
|
|
241
|
-
max?: number | null;
|
|
242
|
-
min?: number | null;
|
|
243
|
-
}
|
|
244
|
-
namespace FeedbackConfig {
|
|
245
|
-
/**
|
|
246
|
-
* Specific value and label pair for feedback
|
|
247
|
-
*/
|
|
248
|
-
interface Category {
|
|
249
|
-
value: number;
|
|
250
|
-
label?: string | null;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
export interface FeedbackListParams extends OffsetPaginationTopLevelArrayParams {
|
|
255
|
-
comparative_experiment_id?: string | null;
|
|
256
|
-
has_comment?: boolean | null;
|
|
257
|
-
has_score?: boolean | null;
|
|
258
|
-
include_user_names?: boolean | null;
|
|
259
|
-
key?: Array<string> | null;
|
|
260
|
-
/**
|
|
261
|
-
* Enum for feedback levels.
|
|
262
|
-
*/
|
|
263
|
-
level?: FeedbackLevel | null;
|
|
264
|
-
max_created_at?: string | null;
|
|
265
|
-
min_created_at?: string | null;
|
|
266
|
-
run?: Array<string> | string | null;
|
|
267
|
-
session?: Array<string> | string | null;
|
|
268
|
-
source?: Array<SourceType> | null;
|
|
269
|
-
user?: Array<string> | null;
|
|
270
|
-
}
|
|
271
|
-
export declare namespace Feedback {
|
|
272
|
-
export { type APIFeedbackSource as APIFeedbackSource, type AppFeedbackSource as AppFeedbackSource, type AutoEvalFeedbackSource as AutoEvalFeedbackSource, type FeedbackCreateSchema as FeedbackCreateSchema, type FeedbackLevel as FeedbackLevel, type FeedbackSchema as FeedbackSchema, type ModelFeedbackSource as ModelFeedbackSource, type SourceType as SourceType, type FeedbackDeleteResponse as FeedbackDeleteResponse, type FeedbackSchemasOffsetPaginationTopLevelArray as FeedbackSchemasOffsetPaginationTopLevelArray, type FeedbackCreateParams as FeedbackCreateParams, type FeedbackRetrieveParams as FeedbackRetrieveParams, type FeedbackUpdateParams as FeedbackUpdateParams, type FeedbackListParams as FeedbackListParams, };
|
|
273
|
-
export { Tokens as Tokens, type FeedbackIngestTokenCreateSchema as FeedbackIngestTokenCreateSchema, type FeedbackIngestTokenSchema as FeedbackIngestTokenSchema, type TokenCreateResponse as TokenCreateResponse, type TokenRetrieveResponse as TokenRetrieveResponse, type TokenUpdateResponse as TokenUpdateResponse, type TokenListResponse as TokenListResponse, type TokenCreateParams as TokenCreateParams, type TokenRetrieveParams as TokenRetrieveParams, type TokenUpdateParams as TokenUpdateParams, type TokenListParams as TokenListParams, };
|
|
274
|
-
export { Configs as Configs, type ConfigDeleteParams as ConfigDeleteParams };
|
|
275
|
-
}
|
|
@@ -1,61 +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 * as ConfigsAPI from './configs.js';
|
|
5
|
-
import { Configs } from './configs.js';
|
|
6
|
-
import * as TokensAPI from './tokens.js';
|
|
7
|
-
import { Tokens, } from './tokens.js';
|
|
8
|
-
import { OffsetPaginationTopLevelArray, } from '../../core/pagination.js';
|
|
9
|
-
import { path } from '../../internal/utils/path.js';
|
|
10
|
-
export class Feedback extends APIResource {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
Object.defineProperty(this, "tokens", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true,
|
|
17
|
-
value: new TokensAPI.Tokens(this._client)
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(this, "configs", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
configurable: true,
|
|
22
|
-
writable: true,
|
|
23
|
-
value: new ConfigsAPI.Configs(this._client)
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Create a new feedback.
|
|
28
|
-
*/
|
|
29
|
-
create(body, options) {
|
|
30
|
-
return this._client.post('/api/v1/feedback', { body, ...options });
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Get a specific feedback.
|
|
34
|
-
*/
|
|
35
|
-
retrieve(feedbackID, query = {}, options) {
|
|
36
|
-
return this._client.get(path `/api/v1/feedback/${feedbackID}`, { query, ...options });
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Replace an existing feedback entry with a new, modified entry.
|
|
40
|
-
*/
|
|
41
|
-
update(feedbackID, body, options) {
|
|
42
|
-
return this._client.patch(path `/api/v1/feedback/${feedbackID}`, { body, ...options });
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* List all Feedback by query params.
|
|
46
|
-
*/
|
|
47
|
-
list(query = {}, options) {
|
|
48
|
-
return this._client.getAPIList('/api/v1/feedback', (OffsetPaginationTopLevelArray), {
|
|
49
|
-
query,
|
|
50
|
-
...options,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Delete a feedback.
|
|
55
|
-
*/
|
|
56
|
-
delete(feedbackID, options) {
|
|
57
|
-
return this._client.delete(path `/api/v1/feedback/${feedbackID}`, options);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
Feedback.Tokens = Tokens;
|
|
61
|
-
Feedback.Configs = Configs;
|
|
@@ -1,35 +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.Tokens = void 0;
|
|
6
|
-
const resource_js_1 = require("../../core/resource.cjs");
|
|
7
|
-
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
8
|
-
class Tokens extends resource_js_1.APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Create a new feedback ingest token.
|
|
11
|
-
*/
|
|
12
|
-
create(params, options) {
|
|
13
|
-
const body = 'body' in params ? params.body : params;
|
|
14
|
-
return this._client.post('/api/v1/feedback/tokens', { body, ...options });
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Create a new feedback with a token.
|
|
18
|
-
*/
|
|
19
|
-
retrieve(token, query = {}, options) {
|
|
20
|
-
return this._client.get((0, path_js_1.path) `/api/v1/feedback/tokens/${token}`, { query, ...options });
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Create a new feedback with a token.
|
|
24
|
-
*/
|
|
25
|
-
update(token, body, options) {
|
|
26
|
-
return this._client.post((0, path_js_1.path) `/api/v1/feedback/tokens/${token}`, { body, ...options });
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* List all feedback ingest tokens for a run.
|
|
30
|
-
*/
|
|
31
|
-
list(query, options) {
|
|
32
|
-
return this._client.get('/api/v1/feedback/tokens', { query, ...options });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.Tokens = Tokens;
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { APIResource } from '../../core/resource.js';
|
|
2
|
-
import * as SessionsAPI from '../sessions/sessions.js';
|
|
3
|
-
import { APIPromise } from '../../core/api-promise.js';
|
|
4
|
-
import { RequestOptions } from '../../internal/request-options.js';
|
|
5
|
-
export declare class Tokens extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Create a new feedback ingest token.
|
|
8
|
-
*/
|
|
9
|
-
create(params: TokenCreateParams, options?: RequestOptions): APIPromise<TokenCreateResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Create a new feedback with a token.
|
|
12
|
-
*/
|
|
13
|
-
retrieve(token: string, query?: TokenRetrieveParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
|
|
14
|
-
/**
|
|
15
|
-
* Create a new feedback with a token.
|
|
16
|
-
*/
|
|
17
|
-
update(token: string, body: TokenUpdateParams, options?: RequestOptions): APIPromise<unknown>;
|
|
18
|
-
/**
|
|
19
|
-
* List all feedback ingest tokens for a run.
|
|
20
|
-
*/
|
|
21
|
-
list(query: TokenListParams, options?: RequestOptions): APIPromise<TokenListResponse>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Feedback ingest token create schema.
|
|
25
|
-
*/
|
|
26
|
-
export interface FeedbackIngestTokenCreateSchema {
|
|
27
|
-
feedback_key: string;
|
|
28
|
-
run_id: string;
|
|
29
|
-
expires_at?: string | null;
|
|
30
|
-
/**
|
|
31
|
-
* Timedelta input.
|
|
32
|
-
*/
|
|
33
|
-
expires_in?: SessionsAPI.TimedeltaInput | null;
|
|
34
|
-
feedback_config?: FeedbackIngestTokenCreateSchema.FeedbackConfig | null;
|
|
35
|
-
}
|
|
36
|
-
export declare namespace FeedbackIngestTokenCreateSchema {
|
|
37
|
-
interface FeedbackConfig {
|
|
38
|
-
/**
|
|
39
|
-
* Enum for feedback types.
|
|
40
|
-
*/
|
|
41
|
-
type: 'continuous' | 'categorical' | 'freeform';
|
|
42
|
-
categories?: Array<FeedbackConfig.Category> | null;
|
|
43
|
-
max?: number | null;
|
|
44
|
-
min?: number | null;
|
|
45
|
-
}
|
|
46
|
-
namespace FeedbackConfig {
|
|
47
|
-
/**
|
|
48
|
-
* Specific value and label pair for feedback
|
|
49
|
-
*/
|
|
50
|
-
interface Category {
|
|
51
|
-
value: number;
|
|
52
|
-
label?: string | null;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Feedback ingest token schema.
|
|
58
|
-
*/
|
|
59
|
-
export interface FeedbackIngestTokenSchema {
|
|
60
|
-
id: string;
|
|
61
|
-
expires_at: string;
|
|
62
|
-
feedback_key: string;
|
|
63
|
-
url: string;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Feedback ingest token schema.
|
|
67
|
-
*/
|
|
68
|
-
export type TokenCreateResponse = FeedbackIngestTokenSchema | Array<FeedbackIngestTokenSchema>;
|
|
69
|
-
export type TokenRetrieveResponse = unknown;
|
|
70
|
-
export type TokenUpdateResponse = unknown;
|
|
71
|
-
export type TokenListResponse = Array<FeedbackIngestTokenSchema>;
|
|
72
|
-
export type TokenCreateParams = TokenCreateParams.FeedbackIngestTokenCreateSchema | TokenCreateParams.Variant1;
|
|
73
|
-
export declare namespace TokenCreateParams {
|
|
74
|
-
interface FeedbackIngestTokenCreateSchema {
|
|
75
|
-
feedback_key: string;
|
|
76
|
-
run_id: string;
|
|
77
|
-
expires_at?: string | null;
|
|
78
|
-
/**
|
|
79
|
-
* Timedelta input.
|
|
80
|
-
*/
|
|
81
|
-
expires_in?: SessionsAPI.TimedeltaInput | null;
|
|
82
|
-
feedback_config?: FeedbackIngestTokenCreateSchema.FeedbackConfig | null;
|
|
83
|
-
}
|
|
84
|
-
namespace FeedbackIngestTokenCreateSchema {
|
|
85
|
-
interface FeedbackConfig {
|
|
86
|
-
/**
|
|
87
|
-
* Enum for feedback types.
|
|
88
|
-
*/
|
|
89
|
-
type: 'continuous' | 'categorical' | 'freeform';
|
|
90
|
-
categories?: Array<FeedbackConfig.Category> | null;
|
|
91
|
-
max?: number | null;
|
|
92
|
-
min?: number | null;
|
|
93
|
-
}
|
|
94
|
-
namespace FeedbackConfig {
|
|
95
|
-
/**
|
|
96
|
-
* Specific value and label pair for feedback
|
|
97
|
-
*/
|
|
98
|
-
interface Category {
|
|
99
|
-
value: number;
|
|
100
|
-
label?: string | null;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
interface Variant1 {
|
|
105
|
-
body: Array<FeedbackIngestTokenCreateSchema>;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
export interface TokenRetrieveParams {
|
|
109
|
-
comment?: string | null;
|
|
110
|
-
correction?: string | null;
|
|
111
|
-
score?: number | boolean | null;
|
|
112
|
-
value?: number | boolean | string | null;
|
|
113
|
-
}
|
|
114
|
-
export interface TokenUpdateParams {
|
|
115
|
-
comment?: string | null;
|
|
116
|
-
correction?: {
|
|
117
|
-
[key: string]: unknown;
|
|
118
|
-
} | string | null;
|
|
119
|
-
metadata?: {
|
|
120
|
-
[key: string]: unknown;
|
|
121
|
-
} | null;
|
|
122
|
-
score?: number | boolean | null;
|
|
123
|
-
value?: number | boolean | string | null;
|
|
124
|
-
}
|
|
125
|
-
export interface TokenListParams {
|
|
126
|
-
run_id: string;
|
|
127
|
-
}
|
|
128
|
-
export declare namespace Tokens {
|
|
129
|
-
export { type FeedbackIngestTokenCreateSchema as FeedbackIngestTokenCreateSchema, type FeedbackIngestTokenSchema as FeedbackIngestTokenSchema, type TokenCreateResponse as TokenCreateResponse, type TokenRetrieveResponse as TokenRetrieveResponse, type TokenUpdateResponse as TokenUpdateResponse, type TokenListResponse as TokenListResponse, type TokenCreateParams as TokenCreateParams, type TokenRetrieveParams as TokenRetrieveParams, type TokenUpdateParams as TokenUpdateParams, type TokenListParams as TokenListParams, };
|
|
130
|
-
}
|
|
@@ -1,31 +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 Tokens extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Create a new feedback ingest token.
|
|
8
|
-
*/
|
|
9
|
-
create(params, options) {
|
|
10
|
-
const body = 'body' in params ? params.body : params;
|
|
11
|
-
return this._client.post('/api/v1/feedback/tokens', { body, ...options });
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Create a new feedback with a token.
|
|
15
|
-
*/
|
|
16
|
-
retrieve(token, query = {}, options) {
|
|
17
|
-
return this._client.get(path `/api/v1/feedback/tokens/${token}`, { query, ...options });
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Create a new feedback with a token.
|
|
21
|
-
*/
|
|
22
|
-
update(token, body, options) {
|
|
23
|
-
return this._client.post(path `/api/v1/feedback/tokens/${token}`, { body, ...options });
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* List all feedback ingest tokens for a run.
|
|
27
|
-
*/
|
|
28
|
-
list(query, options) {
|
|
29
|
-
return this._client.get('/api/v1/feedback/tokens', { query, ...options });
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,47 +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.Datasets = void 0;
|
|
6
|
-
const resource_js_1 = require("../../core/resource.cjs");
|
|
7
|
-
const pagination_js_1 = require("../../core/pagination.cjs");
|
|
8
|
-
const headers_js_1 = require("../../internal/headers.cjs");
|
|
9
|
-
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
10
|
-
class Datasets extends resource_js_1.APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Get dataset by ids or the shared dataset if not specifed.
|
|
13
|
-
*/
|
|
14
|
-
list(shareToken, query = {}, options) {
|
|
15
|
-
return this._client.get((0, path_js_1.path) `/api/v1/public/${shareToken}/datasets`, { query, ...options });
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Get all comparative experiments for a given dataset.
|
|
19
|
-
*/
|
|
20
|
-
listComparative(shareToken, query = {}, options) {
|
|
21
|
-
return this._client.getAPIList((0, path_js_1.path) `/api/v1/public/${shareToken}/datasets/comparative`, (pagination_js_1.OffsetPaginationTopLevelArray), { query, ...options });
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Get feedback for runs in projects run over a dataset that has been shared.
|
|
25
|
-
*/
|
|
26
|
-
listFeedback(shareToken, query = {}, options) {
|
|
27
|
-
return this._client.getAPIList((0, path_js_1.path) `/api/v1/public/${shareToken}/datasets/feedback`, (pagination_js_1.OffsetPaginationTopLevelArray), { query, ...options });
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Get projects run on a dataset that has been shared.
|
|
31
|
-
*/
|
|
32
|
-
listSessions(shareToken, params = {}, options) {
|
|
33
|
-
const { accept, ...query } = params ?? {};
|
|
34
|
-
return this._client.getAPIList((0, path_js_1.path) `/api/v1/public/${shareToken}/datasets/sessions`, (pagination_js_1.OffsetPaginationTopLevelArray), {
|
|
35
|
-
query,
|
|
36
|
-
...options,
|
|
37
|
-
headers: (0, headers_js_1.buildHeaders)([{ ...(accept != null ? { accept: accept } : undefined) }, options?.headers]),
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get sessions from multiple datasets using share tokens.
|
|
42
|
-
*/
|
|
43
|
-
retrieveSessionsBulk(query, options) {
|
|
44
|
-
return this._client.get('/api/v1/public/datasets/sessions-bulk', { query, ...options });
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
exports.Datasets = Datasets;
|