scorecard-ai 0.6.0 → 0.6.1
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 +9 -9
- package/api/resources/prompt/client/Client.d.ts +27 -8
- package/api/resources/prompt/client/Client.js +126 -15
- package/api/resources/prompt/client/requests/PromptCreateParams.d.ts +8 -2
- package/api/resources/prompt/client/requests/PromptGetByNameRequest.d.ts +4 -0
- package/api/resources/prompt/client/requests/PromptListPromptsRequest.d.ts +21 -0
- package/api/resources/prompt/client/requests/PromptListPromptsRequest.js +5 -0
- package/api/resources/prompt/client/requests/index.d.ts +1 -0
- package/api/resources/run/client/Client.js +3 -3
- package/api/resources/runMetric/client/Client.js +1 -1
- package/api/resources/score/client/Client.js +2 -2
- package/api/resources/scoringConfig/client/Client.d.ts +17 -1
- package/api/resources/scoringConfig/client/Client.js +90 -3
- package/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +3 -1
- package/api/resources/testcase/client/Client.d.ts +1 -1
- package/api/resources/testcase/client/Client.js +7 -7
- package/api/resources/testrecord/client/Client.js +2 -2
- package/api/resources/testset/client/Client.d.ts +4 -4
- package/api/resources/testset/client/Client.js +21 -12
- package/api/resources/testset/client/requests/TestsetCreateParams.d.ts +2 -0
- package/api/resources/testset/client/requests/TestsetGetRequest.d.ts +11 -0
- package/api/resources/testset/client/requests/TestsetGetRequest.js +5 -0
- package/api/resources/testset/client/requests/index.d.ts +1 -0
- package/api/resources/tracing/client/Client.js +3 -3
- package/api/types/Prompt.d.ts +2 -0
- package/api/types/PromptCursorPage.d.ts +17 -0
- package/api/types/PromptCursorPage.js +5 -0
- package/api/types/ScoringConfig.d.ts +2 -0
- package/api/types/Testset.d.ts +2 -0
- package/api/types/TestsetCursorPage.d.ts +17 -0
- package/api/types/TestsetCursorPage.js +5 -0
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/dist/api/resources/prompt/client/Client.d.ts +27 -8
- package/dist/api/resources/prompt/client/Client.js +126 -15
- package/dist/api/resources/prompt/client/requests/PromptCreateParams.d.ts +8 -2
- package/dist/api/resources/prompt/client/requests/PromptGetByNameRequest.d.ts +4 -0
- package/dist/api/resources/prompt/client/requests/PromptListPromptsRequest.d.ts +21 -0
- package/dist/api/resources/prompt/client/requests/PromptListPromptsRequest.js +5 -0
- package/dist/api/resources/prompt/client/requests/index.d.ts +1 -0
- package/dist/api/resources/run/client/Client.js +3 -3
- package/dist/api/resources/runMetric/client/Client.js +1 -1
- package/dist/api/resources/score/client/Client.js +2 -2
- package/dist/api/resources/scoringConfig/client/Client.d.ts +17 -1
- package/dist/api/resources/scoringConfig/client/Client.js +90 -3
- package/dist/api/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +3 -1
- package/dist/api/resources/testcase/client/Client.d.ts +1 -1
- package/dist/api/resources/testcase/client/Client.js +7 -7
- package/dist/api/resources/testrecord/client/Client.js +2 -2
- package/dist/api/resources/testset/client/Client.d.ts +4 -4
- package/dist/api/resources/testset/client/Client.js +21 -12
- package/dist/api/resources/testset/client/requests/TestsetCreateParams.d.ts +2 -0
- package/dist/api/resources/testset/client/requests/TestsetGetRequest.d.ts +11 -0
- package/dist/api/resources/testset/client/requests/TestsetGetRequest.js +5 -0
- package/dist/api/resources/testset/client/requests/index.d.ts +1 -0
- package/dist/api/resources/tracing/client/Client.js +3 -3
- package/dist/api/types/Prompt.d.ts +2 -0
- package/dist/api/types/PromptCursorPage.d.ts +17 -0
- package/dist/api/types/PromptCursorPage.js +5 -0
- package/dist/api/types/ScoringConfig.d.ts +2 -0
- package/dist/api/types/Testset.d.ts +2 -0
- package/dist/api/types/TestsetCursorPage.d.ts +17 -0
- package/dist/api/types/TestsetCursorPage.js +5 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/serialization/resources/prompt/client/requests/PromptCreateParams.d.ts +2 -0
- package/dist/serialization/resources/prompt/client/requests/PromptCreateParams.js +2 -0
- package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +1 -0
- package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +1 -0
- package/dist/serialization/resources/testcase/client/batchCopy.d.ts +11 -0
- package/dist/serialization/resources/testcase/client/batchCopy.js +32 -0
- package/dist/serialization/resources/testcase/client/index.d.ts +1 -0
- package/dist/serialization/resources/testcase/client/index.js +14 -0
- package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +1 -0
- package/dist/serialization/resources/testset/client/requests/TestsetCreateParams.js +1 -0
- package/dist/serialization/types/Prompt.d.ts +1 -0
- package/dist/serialization/types/Prompt.js +1 -0
- package/dist/serialization/types/PromptCursorPage.d.ts +18 -0
- package/dist/serialization/types/PromptCursorPage.js +39 -0
- package/dist/serialization/types/ScoringConfig.d.ts +1 -0
- package/dist/serialization/types/ScoringConfig.js +1 -0
- package/dist/serialization/types/Testset.d.ts +1 -0
- package/dist/serialization/types/Testset.js +1 -0
- package/dist/serialization/types/TestsetCursorPage.d.ts +18 -0
- package/dist/serialization/types/TestsetCursorPage.js +39 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/package.json +1 -1
- package/reference.md +140 -11
- package/serialization/resources/prompt/client/requests/PromptCreateParams.d.ts +2 -0
- package/serialization/resources/prompt/client/requests/PromptCreateParams.js +2 -0
- package/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.d.ts +1 -0
- package/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js +1 -0
- package/serialization/resources/testcase/client/batchCopy.d.ts +11 -0
- package/serialization/resources/testcase/client/batchCopy.js +32 -0
- package/serialization/resources/testcase/client/index.d.ts +1 -0
- package/serialization/resources/testcase/client/index.js +14 -0
- package/serialization/resources/testset/client/requests/TestsetCreateParams.d.ts +1 -0
- package/serialization/resources/testset/client/requests/TestsetCreateParams.js +1 -0
- package/serialization/types/Prompt.d.ts +1 -0
- package/serialization/types/Prompt.js +1 -0
- package/serialization/types/PromptCursorPage.d.ts +18 -0
- package/serialization/types/PromptCursorPage.js +39 -0
- package/serialization/types/ScoringConfig.d.ts +1 -0
- package/serialization/types/ScoringConfig.js +1 -0
- package/serialization/types/Testset.d.ts +1 -0
- package/serialization/types/Testset.js +1 -0
- package/serialization/types/TestsetCursorPage.d.ts +18 -0
- package/serialization/types/TestsetCursorPage.js +39 -0
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
|
@@ -70,7 +70,7 @@ class Testrecord {
|
|
|
70
70
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
71
71
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/run/${encodeURIComponent(runId)}/testrecord/${encodeURIComponent(testrecordId)}`),
|
|
72
72
|
method: "GET",
|
|
73
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
73
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
requestType: "json",
|
|
76
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -163,7 +163,7 @@ class Testrecord {
|
|
|
163
163
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
164
164
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/run/${encodeURIComponent(runId)}/testrecord`),
|
|
165
165
|
method: "POST",
|
|
166
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
166
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
167
167
|
contentType: "application/json",
|
|
168
168
|
requestType: "json",
|
|
169
169
|
body: serializers.TestrecordCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -23,9 +23,9 @@ export declare class Testset {
|
|
|
23
23
|
protected readonly _options: Testset.Options;
|
|
24
24
|
constructor(_options: Testset.Options);
|
|
25
25
|
/**
|
|
26
|
-
* Retrieve
|
|
26
|
+
* Retrieve all Testsets with cursor-based pagination
|
|
27
27
|
*
|
|
28
|
-
* @param {
|
|
28
|
+
* @param {Scorecard.TestsetGetRequest} request
|
|
29
29
|
* @param {Testset.RequestOptions} requestOptions - Request-specific configuration.
|
|
30
30
|
*
|
|
31
31
|
* @throws {@link Scorecard.UnauthorizedError}
|
|
@@ -34,9 +34,9 @@ export declare class Testset {
|
|
|
34
34
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
|
-
* await client.testset.get(
|
|
37
|
+
* await client.testset.get()
|
|
38
38
|
*/
|
|
39
|
-
get(
|
|
39
|
+
get(request?: Scorecard.TestsetGetRequest, requestOptions?: Testset.RequestOptions): Promise<Scorecard.TestsetCursorPage>;
|
|
40
40
|
/**
|
|
41
41
|
* Delete a Testset
|
|
42
42
|
*
|
|
@@ -50,9 +50,9 @@ class Testset {
|
|
|
50
50
|
this._options = _options;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
* Retrieve
|
|
53
|
+
* Retrieve all Testsets with cursor-based pagination
|
|
54
54
|
*
|
|
55
|
-
* @param {
|
|
55
|
+
* @param {Scorecard.TestsetGetRequest} request
|
|
56
56
|
* @param {Testset.RequestOptions} requestOptions - Request-specific configuration.
|
|
57
57
|
*
|
|
58
58
|
* @throws {@link Scorecard.UnauthorizedError}
|
|
@@ -61,23 +61,32 @@ class Testset {
|
|
|
61
61
|
* @throws {@link Scorecard.UnprocessableEntityError}
|
|
62
62
|
*
|
|
63
63
|
* @example
|
|
64
|
-
* await client.testset.get(
|
|
64
|
+
* await client.testset.get()
|
|
65
65
|
*/
|
|
66
|
-
get(
|
|
66
|
+
get(request = {}, requestOptions) {
|
|
67
67
|
var _a, _b;
|
|
68
68
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const { cursor, size } = request;
|
|
70
|
+
const _queryParams = {};
|
|
71
|
+
if (cursor != null) {
|
|
72
|
+
_queryParams["cursor"] = cursor;
|
|
73
|
+
}
|
|
74
|
+
if (size != null) {
|
|
75
|
+
_queryParams["size"] = size.toString();
|
|
76
|
+
}
|
|
69
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default,
|
|
78
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/testset"),
|
|
71
79
|
method: "GET",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
80
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
73
81
|
contentType: "application/json",
|
|
82
|
+
queryParameters: _queryParams,
|
|
74
83
|
requestType: "json",
|
|
75
84
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
76
85
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
77
86
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
78
87
|
});
|
|
79
88
|
if (_response.ok) {
|
|
80
|
-
return serializers.
|
|
89
|
+
return serializers.TestsetCursorPage.parseOrThrow(_response.body, {
|
|
81
90
|
unrecognizedObjectKeys: "passthrough",
|
|
82
91
|
allowUnrecognizedUnionMembers: true,
|
|
83
92
|
allowUnrecognizedEnumValues: true,
|
|
@@ -161,7 +170,7 @@ class Testset {
|
|
|
161
170
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
162
171
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/testset/${encodeURIComponent(testsetId)}`),
|
|
163
172
|
method: "DELETE",
|
|
164
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
173
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
165
174
|
contentType: "application/json",
|
|
166
175
|
requestType: "json",
|
|
167
176
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -254,7 +263,7 @@ class Testset {
|
|
|
254
263
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
255
264
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/testset/${encodeURIComponent(testsetId)}`),
|
|
256
265
|
method: "PATCH",
|
|
257
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
266
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
258
267
|
contentType: "application/json",
|
|
259
268
|
requestType: "json",
|
|
260
269
|
body: serializers.TestsetUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -349,7 +358,7 @@ class Testset {
|
|
|
349
358
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
350
359
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/testset"),
|
|
351
360
|
method: "POST",
|
|
352
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
361
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
353
362
|
contentType: "application/json",
|
|
354
363
|
requestType: "json",
|
|
355
364
|
body: serializers.TestsetCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -442,7 +451,7 @@ class Testset {
|
|
|
442
451
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
443
452
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/testset/${encodeURIComponent(testsetId)}/schema`),
|
|
444
453
|
method: "GET",
|
|
445
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
454
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
446
455
|
contentType: "application/json",
|
|
447
456
|
requestType: "json",
|
|
448
457
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -543,7 +552,7 @@ class Testset {
|
|
|
543
552
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
544
553
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/testset/${encodeURIComponent(testsetId)}/testcase`),
|
|
545
554
|
method: "GET",
|
|
546
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
555
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
547
556
|
contentType: "application/json",
|
|
548
557
|
queryParameters: _queryParams,
|
|
549
558
|
requestType: "json",
|
|
@@ -21,4 +21,6 @@ export interface TestsetCreateParams {
|
|
|
21
21
|
ingestionMethod?: Scorecard.IngestionMethod;
|
|
22
22
|
/** Whether or not the testset is published. */
|
|
23
23
|
published?: boolean;
|
|
24
|
+
/** Whether or not the testset was created by the playground. */
|
|
25
|
+
createdByPlayground?: boolean;
|
|
24
26
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { type TestsetGetRequest } from "./TestsetGetRequest";
|
|
1
2
|
export { type TestsetUpdateParams } from "./TestsetUpdateParams";
|
|
2
3
|
export { type TestsetCreateParams } from "./TestsetCreateParams";
|
|
3
4
|
export { type TestsetGetTestcasesRequest } from "./TestsetGetTestcasesRequest";
|
|
@@ -67,7 +67,7 @@ class Tracing {
|
|
|
67
67
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
68
68
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/traces"),
|
|
69
69
|
method: "GET",
|
|
70
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
70
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
71
71
|
contentType: "application/json",
|
|
72
72
|
requestType: "json",
|
|
73
73
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -151,7 +151,7 @@ class Tracing {
|
|
|
151
151
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
152
152
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/traces/${encodeURIComponent(traceId)}`),
|
|
153
153
|
method: "GET",
|
|
154
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
154
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
155
155
|
contentType: "application/json",
|
|
156
156
|
requestType: "json",
|
|
157
157
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -244,7 +244,7 @@ class Tracing {
|
|
|
244
244
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
245
245
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/traces/${encodeURIComponent(traceId)}/spans/${encodeURIComponent(spanId)}`),
|
|
246
246
|
method: "GET",
|
|
247
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.
|
|
247
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.6.1", "User-Agent": "scorecard-ai/0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
248
248
|
contentType: "application/json",
|
|
249
249
|
requestType: "json",
|
|
250
250
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Scorecard from "../index";
|
|
5
|
+
export interface PromptCursorPage {
|
|
6
|
+
items: Scorecard.Prompt[];
|
|
7
|
+
/** Total items */
|
|
8
|
+
total?: number;
|
|
9
|
+
/** Cursor to refetch the current page */
|
|
10
|
+
currentPage?: string;
|
|
11
|
+
/** Cursor to refetch the current page starting from the last item */
|
|
12
|
+
currentPageBackwards?: string;
|
|
13
|
+
/** Cursor for the previous page */
|
|
14
|
+
previousPage?: string;
|
|
15
|
+
/** Cursor for the next page */
|
|
16
|
+
nextPage?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Scorecard from "../index";
|
|
5
|
+
export interface TestsetCursorPage {
|
|
6
|
+
items: Scorecard.Testset[];
|
|
7
|
+
/** Total items */
|
|
8
|
+
total?: number;
|
|
9
|
+
/** Cursor to refetch the current page */
|
|
10
|
+
currentPage?: string;
|
|
11
|
+
/** Cursor to refetch the current page starting from the last item */
|
|
12
|
+
currentPageBackwards?: string;
|
|
13
|
+
/** Cursor for the previous page */
|
|
14
|
+
previousPage?: string;
|
|
15
|
+
/** Cursor for the next page */
|
|
16
|
+
nextPage?: string;
|
|
17
|
+
}
|
|
@@ -12,6 +12,7 @@ export * from "./NotFoundErrorBody";
|
|
|
12
12
|
export * from "./PaginatedTestcaseResponse";
|
|
13
13
|
export * from "./PromptModelParamsValue";
|
|
14
14
|
export * from "./Prompt";
|
|
15
|
+
export * from "./PromptCursorPage";
|
|
15
16
|
export * from "./RoleEnum";
|
|
16
17
|
export * from "./Run";
|
|
17
18
|
export * from "./RunMetric";
|
|
@@ -31,6 +32,7 @@ export * from "./TestrecordModelParamsValue";
|
|
|
31
32
|
export * from "./TestrecordModelDebugInfoValue";
|
|
32
33
|
export * from "./Testrecord";
|
|
33
34
|
export * from "./Testset";
|
|
35
|
+
export * from "./TestsetCursorPage";
|
|
34
36
|
export * from "./Trace";
|
|
35
37
|
export * from "./UnauthenticatedError";
|
|
36
38
|
export * from "./UnauthorizedErrorBody";
|
package/dist/api/types/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __exportStar(require("./NotFoundErrorBody"), exports);
|
|
|
28
28
|
__exportStar(require("./PaginatedTestcaseResponse"), exports);
|
|
29
29
|
__exportStar(require("./PromptModelParamsValue"), exports);
|
|
30
30
|
__exportStar(require("./Prompt"), exports);
|
|
31
|
+
__exportStar(require("./PromptCursorPage"), exports);
|
|
31
32
|
__exportStar(require("./RoleEnum"), exports);
|
|
32
33
|
__exportStar(require("./Run"), exports);
|
|
33
34
|
__exportStar(require("./RunMetric"), exports);
|
|
@@ -47,6 +48,7 @@ __exportStar(require("./TestrecordModelParamsValue"), exports);
|
|
|
47
48
|
__exportStar(require("./TestrecordModelDebugInfoValue"), exports);
|
|
48
49
|
__exportStar(require("./Testrecord"), exports);
|
|
49
50
|
__exportStar(require("./Testset"), exports);
|
|
51
|
+
__exportStar(require("./TestsetCursorPage"), exports);
|
|
50
52
|
__exportStar(require("./Trace"), exports);
|
|
51
53
|
__exportStar(require("./UnauthenticatedError"), exports);
|
|
52
54
|
__exportStar(require("./UnauthorizedErrorBody"), exports);
|
|
@@ -13,6 +13,8 @@ export declare namespace PromptCreateParams {
|
|
|
13
13
|
parent_id?: string | null;
|
|
14
14
|
description?: string | null;
|
|
15
15
|
model_params?: Record<string, PromptCreateParamsModelParamsValue.Raw | null | undefined> | null;
|
|
16
|
+
tag?: string | null;
|
|
16
17
|
is_prod?: boolean | null;
|
|
18
|
+
project_id?: number | null;
|
|
17
19
|
}
|
|
18
20
|
}
|
|
@@ -35,5 +35,7 @@ exports.PromptCreateParams = core.serialization.object({
|
|
|
35
35
|
parentId: core.serialization.property("parent_id", core.serialization.string().optional()),
|
|
36
36
|
description: core.serialization.string().optional(),
|
|
37
37
|
modelParams: core.serialization.property("model_params", core.serialization.record(core.serialization.string(), PromptCreateParamsModelParamsValue_1.PromptCreateParamsModelParamsValue.optional()).optional()),
|
|
38
|
+
tag: core.serialization.string().optional(),
|
|
38
39
|
isProd: core.serialization.property("is_prod", core.serialization.boolean().optional()),
|
|
40
|
+
projectId: core.serialization.property("project_id", core.serialization.number().optional()),
|
|
39
41
|
});
|
package/dist/serialization/resources/scoringConfig/client/requests/ScoringConfigCreateParams.js
CHANGED
|
@@ -32,4 +32,5 @@ exports.ScoringConfigCreateParams = core.serialization.object({
|
|
|
32
32
|
name: core.serialization.string().optional(),
|
|
33
33
|
description: core.serialization.string().optional(),
|
|
34
34
|
metrics: core.serialization.list(core.serialization.number()).optional(),
|
|
35
|
+
projectId: core.serialization.property("project_id", core.serialization.number().optional()),
|
|
35
36
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../../../index";
|
|
5
|
+
import * as Scorecard from "../../../../api/index";
|
|
6
|
+
import * as core from "../../../../core";
|
|
7
|
+
import { TestCase } from "../../../types/TestCase";
|
|
8
|
+
export declare const Response: core.serialization.Schema<serializers.testcase.batchCopy.Response.Raw, Scorecard.TestCase[]>;
|
|
9
|
+
export declare namespace Response {
|
|
10
|
+
type Raw = TestCase.Raw[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.Response = void 0;
|
|
30
|
+
const core = __importStar(require("../../../../core"));
|
|
31
|
+
const TestCase_1 = require("../../../types/TestCase");
|
|
32
|
+
exports.Response = core.serialization.list(TestCase_1.TestCase);
|
|
@@ -10,8 +10,22 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
13
25
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
27
|
};
|
|
16
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.batchCopy = void 0;
|
|
30
|
+
exports.batchCopy = __importStar(require("./batchCopy"));
|
|
17
31
|
__exportStar(require("./requests"), exports);
|
|
@@ -38,4 +38,5 @@ exports.TestsetCreateParams = core.serialization.object({
|
|
|
38
38
|
projectId: core.serialization.property("project_id", core.serialization.number().optional()),
|
|
39
39
|
ingestionMethod: core.serialization.property("ingestion_method", IngestionMethod_1.IngestionMethod.optional()),
|
|
40
40
|
published: core.serialization.boolean().optional(),
|
|
41
|
+
createdByPlayground: core.serialization.property("created_by_playground", core.serialization.boolean().optional()),
|
|
41
42
|
});
|
|
@@ -42,4 +42,5 @@ exports.Prompt = core.serialization.object({
|
|
|
42
42
|
parentId: core.serialization.property("parent_id", core.serialization.string().optional()),
|
|
43
43
|
mergeParentId: core.serialization.property("merge_parent_id", core.serialization.string().optional()),
|
|
44
44
|
createdAt: core.serialization.property("created_at", core.serialization.date().optional()),
|
|
45
|
+
projectId: core.serialization.property("project_id", core.serialization.number().optional()),
|
|
45
46
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Scorecard from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
import { Prompt } from "./Prompt";
|
|
8
|
+
export declare const PromptCursorPage: core.serialization.ObjectSchema<serializers.PromptCursorPage.Raw, Scorecard.PromptCursorPage>;
|
|
9
|
+
export declare namespace PromptCursorPage {
|
|
10
|
+
interface Raw {
|
|
11
|
+
items: Prompt.Raw[];
|
|
12
|
+
total?: number | null;
|
|
13
|
+
current_page?: string | null;
|
|
14
|
+
current_page_backwards?: string | null;
|
|
15
|
+
previous_page?: string | null;
|
|
16
|
+
next_page?: string | null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.PromptCursorPage = void 0;
|
|
30
|
+
const core = __importStar(require("../../core"));
|
|
31
|
+
const Prompt_1 = require("./Prompt");
|
|
32
|
+
exports.PromptCursorPage = core.serialization.object({
|
|
33
|
+
items: core.serialization.list(Prompt_1.Prompt),
|
|
34
|
+
total: core.serialization.number().optional(),
|
|
35
|
+
currentPage: core.serialization.property("current_page", core.serialization.string().optional()),
|
|
36
|
+
currentPageBackwards: core.serialization.property("current_page_backwards", core.serialization.string().optional()),
|
|
37
|
+
previousPage: core.serialization.property("previous_page", core.serialization.string().optional()),
|
|
38
|
+
nextPage: core.serialization.property("next_page", core.serialization.string().optional()),
|
|
39
|
+
});
|
|
@@ -38,4 +38,5 @@ exports.ScoringConfig = core.serialization.object({
|
|
|
38
38
|
isArchived: core.serialization.property("is_archived", core.serialization.boolean().optional()),
|
|
39
39
|
metrics: core.serialization.list(core.serialization.number()).optional(),
|
|
40
40
|
createdAt: core.serialization.property("created_at", core.serialization.date().optional()),
|
|
41
|
+
projectId: core.serialization.property("project_id", core.serialization.number().optional()),
|
|
41
42
|
});
|
|
@@ -42,4 +42,5 @@ exports.Testset = core.serialization.object({
|
|
|
42
42
|
isArchived: core.serialization.property("is_archived", core.serialization.boolean().optional()),
|
|
43
43
|
projectId: core.serialization.property("project_id", core.serialization.number().optional()),
|
|
44
44
|
customSchema: core.serialization.property("custom_schema", CustomSchema_1.CustomSchema.optional()),
|
|
45
|
+
createdByPlayground: core.serialization.property("created_by_playground", core.serialization.boolean().optional()),
|
|
45
46
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Scorecard from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
import { Testset } from "./Testset";
|
|
8
|
+
export declare const TestsetCursorPage: core.serialization.ObjectSchema<serializers.TestsetCursorPage.Raw, Scorecard.TestsetCursorPage>;
|
|
9
|
+
export declare namespace TestsetCursorPage {
|
|
10
|
+
interface Raw {
|
|
11
|
+
items: Testset.Raw[];
|
|
12
|
+
total?: number | null;
|
|
13
|
+
current_page?: string | null;
|
|
14
|
+
current_page_backwards?: string | null;
|
|
15
|
+
previous_page?: string | null;
|
|
16
|
+
next_page?: string | null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.TestsetCursorPage = void 0;
|
|
30
|
+
const core = __importStar(require("../../core"));
|
|
31
|
+
const Testset_1 = require("./Testset");
|
|
32
|
+
exports.TestsetCursorPage = core.serialization.object({
|
|
33
|
+
items: core.serialization.list(Testset_1.Testset),
|
|
34
|
+
total: core.serialization.number().optional(),
|
|
35
|
+
currentPage: core.serialization.property("current_page", core.serialization.string().optional()),
|
|
36
|
+
currentPageBackwards: core.serialization.property("current_page_backwards", core.serialization.string().optional()),
|
|
37
|
+
previousPage: core.serialization.property("previous_page", core.serialization.string().optional()),
|
|
38
|
+
nextPage: core.serialization.property("next_page", core.serialization.string().optional()),
|
|
39
|
+
});
|