scorecard-ai 0.5.3 → 0.5.4
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/api/resources/prompt/client/Client.js +5 -5
- package/api/resources/run/client/Client.js +3 -3
- package/api/resources/run/client/requests/RunCreateParams.d.ts +1 -0
- package/api/resources/runMetric/client/Client.js +1 -1
- package/api/resources/score/client/Client.js +2 -2
- package/api/resources/score/client/requests/ScoreCreateParams.d.ts +3 -0
- package/api/resources/score/client/requests/ScoreUpdateParams.d.ts +3 -0
- package/api/resources/testcase/client/Client.js +3 -3
- package/api/resources/testcase/client/requests/TestcaseCreateParams.d.ts +2 -0
- package/api/resources/testrecord/client/Client.js +2 -2
- package/api/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +7 -0
- package/api/resources/testset/client/Client.js +5 -5
- package/api/resources/testset/client/requests/TestsetCreateParams.d.ts +2 -0
- package/api/resources/traces/client/Client.js +1 -1
- package/api/types/Grade.d.ts +11 -0
- package/api/types/PaginatedTestcaseResponse.d.ts +2 -0
- package/api/types/Prompt.d.ts +2 -0
- package/api/types/Run.d.ts +14 -0
- package/api/types/TestCase.d.ts +4 -0
- package/api/types/Testrecord.d.ts +12 -0
- package/api/types/Testset.d.ts +11 -0
- package/dist/api/resources/prompt/client/Client.js +5 -5
- package/dist/api/resources/run/client/Client.js +3 -3
- package/dist/api/resources/run/client/requests/RunCreateParams.d.ts +1 -0
- package/dist/api/resources/runMetric/client/Client.js +1 -1
- package/dist/api/resources/score/client/Client.js +2 -2
- package/dist/api/resources/score/client/requests/ScoreCreateParams.d.ts +3 -0
- package/dist/api/resources/score/client/requests/ScoreUpdateParams.d.ts +3 -0
- package/dist/api/resources/testcase/client/Client.js +3 -3
- package/dist/api/resources/testcase/client/requests/TestcaseCreateParams.d.ts +2 -0
- package/dist/api/resources/testrecord/client/Client.js +2 -2
- package/dist/api/resources/testrecord/client/requests/TestrecordCreateParams.d.ts +7 -0
- package/dist/api/resources/testset/client/Client.js +5 -5
- package/dist/api/resources/testset/client/requests/TestsetCreateParams.d.ts +2 -0
- package/dist/api/resources/traces/client/Client.js +1 -1
- package/dist/api/types/Grade.d.ts +11 -0
- package/dist/api/types/PaginatedTestcaseResponse.d.ts +2 -0
- package/dist/api/types/Prompt.d.ts +2 -0
- package/dist/api/types/Run.d.ts +14 -0
- package/dist/api/types/TestCase.d.ts +4 -0
- package/dist/api/types/Testrecord.d.ts +12 -0
- package/dist/api/types/Testset.d.ts +11 -0
- package/dist/telemetry.d.ts +0 -5
- package/dist/telemetry.js +25 -7
- package/dist/wrapper/ScorecardClient.d.ts +3 -0
- package/dist/wrapper/ScorecardClient.js +11 -0
- package/package.json +6 -1
- package/telemetry.d.ts +0 -5
- package/telemetry.js +25 -7
- package/wrapper/ScorecardClient.d.ts +3 -0
- package/wrapper/ScorecardClient.js +11 -0
|
@@ -97,7 +97,7 @@ class Prompt {
|
|
|
97
97
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
98
98
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/prompt"),
|
|
99
99
|
method: "POST",
|
|
100
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
100
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
101
101
|
contentType: "application/json",
|
|
102
102
|
body: yield serializers.PromptCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
103
103
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -189,7 +189,7 @@ class Prompt {
|
|
|
189
189
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
190
190
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/prompt/${encodeURIComponent(id)}`),
|
|
191
191
|
method: "GET",
|
|
192
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
192
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
193
193
|
contentType: "application/json",
|
|
194
194
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
195
195
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -280,7 +280,7 @@ class Prompt {
|
|
|
280
280
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
281
281
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/prompt/${encodeURIComponent(id)}`),
|
|
282
282
|
method: "DELETE",
|
|
283
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
283
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
284
284
|
contentType: "application/json",
|
|
285
285
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
286
286
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -370,7 +370,7 @@ class Prompt {
|
|
|
370
370
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
371
371
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/prompt/${encodeURIComponent(id)}`),
|
|
372
372
|
method: "PATCH",
|
|
373
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
373
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
374
374
|
contentType: "application/json",
|
|
375
375
|
body: yield serializers.PromptUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
376
376
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -462,7 +462,7 @@ class Prompt {
|
|
|
462
462
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
463
463
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/prompt/name/${encodeURIComponent(name)}`),
|
|
464
464
|
method: "GET",
|
|
465
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
465
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
466
466
|
contentType: "application/json",
|
|
467
467
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
468
468
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -69,7 +69,7 @@ class Run {
|
|
|
69
69
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
70
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/run"),
|
|
71
71
|
method: "POST",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
72
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
73
73
|
contentType: "application/json",
|
|
74
74
|
body: yield serializers.RunCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
75
75
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -161,7 +161,7 @@ class Run {
|
|
|
161
161
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
162
162
|
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)}`),
|
|
163
163
|
method: "GET",
|
|
164
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
164
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
165
165
|
contentType: "application/json",
|
|
166
166
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
167
167
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -253,7 +253,7 @@ class Run {
|
|
|
253
253
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
254
254
|
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)}/status`),
|
|
255
255
|
method: "PATCH",
|
|
256
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
256
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
257
257
|
contentType: "application/json",
|
|
258
258
|
body: yield serializers.UpdateStatusParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
259
259
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -69,7 +69,7 @@ class RunMetric {
|
|
|
69
69
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
70
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/run_metric/${encodeURIComponent(runId)}`),
|
|
71
71
|
method: "GET",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
72
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
73
73
|
contentType: "application/json",
|
|
74
74
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
75
75
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -73,7 +73,7 @@ class Score {
|
|
|
73
73
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
74
74
|
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)}/score`),
|
|
75
75
|
method: "POST",
|
|
76
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
76
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
77
77
|
contentType: "application/json",
|
|
78
78
|
body: yield serializers.ScoreCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
79
79
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -168,7 +168,7 @@ class Score {
|
|
|
168
168
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
169
169
|
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)}/score/${encodeURIComponent(scoreId)}`),
|
|
170
170
|
method: "PATCH",
|
|
171
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
171
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
172
172
|
contentType: "application/json",
|
|
173
173
|
body: yield serializers.ScoreUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
174
174
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
export interface ScoreCreateParams {
|
|
11
11
|
/** The ID of the metric */
|
|
12
12
|
metricId: number;
|
|
13
|
+
/** Specify integer scores. */
|
|
13
14
|
intScore?: number;
|
|
15
|
+
/** Specify boolean scores. */
|
|
14
16
|
binaryScore?: boolean;
|
|
17
|
+
/** The reasoning for the assigned score. */
|
|
15
18
|
reasoning?: string;
|
|
16
19
|
}
|
|
@@ -70,7 +70,7 @@ class Testcase {
|
|
|
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/testset/${encodeURIComponent(testsetId)}/testcase`),
|
|
72
72
|
method: "POST",
|
|
73
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
73
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
body: yield serializers.TestcaseCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
76
76
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -163,7 +163,7 @@ class Testcase {
|
|
|
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/testset/${encodeURIComponent(testsetId)}/testcase/${encodeURIComponent(testcaseId)}`),
|
|
165
165
|
method: "GET",
|
|
166
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
166
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
167
167
|
contentType: "application/json",
|
|
168
168
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
169
169
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -255,7 +255,7 @@ class Testcase {
|
|
|
255
255
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
256
256
|
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/${encodeURIComponent(testcaseId)}`),
|
|
257
257
|
method: "DELETE",
|
|
258
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
258
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
259
259
|
contentType: "application/json",
|
|
260
260
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
261
261
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -9,7 +9,9 @@ import * as Scorecard from "../../../../index";
|
|
|
9
9
|
export interface TestcaseCreateParams {
|
|
10
10
|
/** The user query to be executed. */
|
|
11
11
|
userQuery?: string;
|
|
12
|
+
/** The context to be used while generating the testcase. */
|
|
12
13
|
context?: string;
|
|
14
|
+
/** The ideal response to the user query. */
|
|
13
15
|
ideal?: string;
|
|
14
16
|
customInputs?: Record<string, Scorecard.TestcaseCreateParamsCustomInputsValue | undefined>;
|
|
15
17
|
customLabels?: Record<string, Scorecard.TestcaseCreateParamsCustomLabelsValue | undefined>;
|
|
@@ -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.5.
|
|
73
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
74
74
|
contentType: "application/json",
|
|
75
75
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
76
76
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -162,7 +162,7 @@ class Testrecord {
|
|
|
162
162
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
163
163
|
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`),
|
|
164
164
|
method: "POST",
|
|
165
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
165
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
166
166
|
contentType: "application/json",
|
|
167
167
|
body: yield serializers.TestrecordCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
168
168
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -9,14 +9,21 @@ import * as Scorecard from "../../../../index";
|
|
|
9
9
|
export interface TestrecordCreateParams {
|
|
10
10
|
testsetId?: number;
|
|
11
11
|
testcaseId?: number;
|
|
12
|
+
/** The user query that was executed for the testrecord. */
|
|
12
13
|
userQuery?: string;
|
|
14
|
+
/** The context that was used while generating the testrecord. */
|
|
13
15
|
context?: string;
|
|
16
|
+
/** The response generated by the model. */
|
|
14
17
|
response?: string;
|
|
18
|
+
/** The ideal response. */
|
|
15
19
|
ideal?: string;
|
|
16
20
|
customInputs?: Record<string, Scorecard.TestrecordCreateParamsCustomInputsValue | undefined>;
|
|
17
21
|
customOutputs?: Record<string, Scorecard.TestrecordCreateParamsCustomOutputsValue | undefined>;
|
|
18
22
|
customLabels?: Record<string, Scorecard.TestrecordCreateParamsCustomLabelsValue | undefined>;
|
|
23
|
+
/** The prompt used to generate the response. */
|
|
19
24
|
prompt?: string;
|
|
25
|
+
/** The model parameters used to generate the response. */
|
|
20
26
|
modelParams?: Record<string, Scorecard.TestrecordCreateParamsModelParamsValue | undefined>;
|
|
27
|
+
/** Debug information generated by Scorecard during the execution of the testrecord. */
|
|
21
28
|
modelDebugInfo?: Record<string, Scorecard.TestrecordCreateParamsModelDebugInfoValue | undefined>;
|
|
22
29
|
}
|
|
@@ -69,7 +69,7 @@ class Testset {
|
|
|
69
69
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
70
|
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)}`),
|
|
71
71
|
method: "GET",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
72
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
73
73
|
contentType: "application/json",
|
|
74
74
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
75
75
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -160,7 +160,7 @@ class Testset {
|
|
|
160
160
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
161
161
|
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)}`),
|
|
162
162
|
method: "DELETE",
|
|
163
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
163
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
164
164
|
contentType: "application/json",
|
|
165
165
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
166
166
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -253,7 +253,7 @@ class Testset {
|
|
|
253
253
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
254
254
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/testset"),
|
|
255
255
|
method: "POST",
|
|
256
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
256
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
257
257
|
contentType: "application/json",
|
|
258
258
|
body: yield serializers.TestsetCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
259
259
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -345,7 +345,7 @@ class Testset {
|
|
|
345
345
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
346
346
|
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`),
|
|
347
347
|
method: "GET",
|
|
348
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
348
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
349
349
|
contentType: "application/json",
|
|
350
350
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
351
351
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -445,7 +445,7 @@ class Testset {
|
|
|
445
445
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
446
446
|
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`),
|
|
447
447
|
method: "GET",
|
|
448
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
448
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
449
449
|
contentType: "application/json",
|
|
450
450
|
queryParameters: _queryParams,
|
|
451
451
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -10,7 +10,9 @@ import * as Scorecard from "../../../../index";
|
|
|
10
10
|
*/
|
|
11
11
|
export interface TestsetCreateParams {
|
|
12
12
|
name: string;
|
|
13
|
+
/** A description for the testset. */
|
|
13
14
|
description?: string;
|
|
15
|
+
/** Whether or not the testset uses retrieval. */
|
|
14
16
|
usingRetrieval?: boolean;
|
|
15
17
|
customSchema?: Scorecard.CustomSchema;
|
|
16
18
|
}
|
|
@@ -69,7 +69,7 @@ class Traces {
|
|
|
69
69
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
70
|
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`),
|
|
71
71
|
method: "GET",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
72
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
73
73
|
contentType: "application/json",
|
|
74
74
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
75
75
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
package/api/types/Grade.d.ts
CHANGED
|
@@ -4,19 +4,30 @@
|
|
|
4
4
|
import * as Scorecard from "../index";
|
|
5
5
|
export interface Grade {
|
|
6
6
|
userId?: string;
|
|
7
|
+
/** The ID of the grade. */
|
|
7
8
|
id?: number;
|
|
9
|
+
/** The ID of the run that created the grade. */
|
|
8
10
|
runId?: number;
|
|
11
|
+
/** The ID of the testcase associated with the grade. */
|
|
9
12
|
testcaseId?: number;
|
|
13
|
+
/** The ID of the testrecord for which the grade was created. */
|
|
10
14
|
testrecordId?: number;
|
|
15
|
+
/** The ID of the metric used to compute the grade. */
|
|
11
16
|
metricId?: number;
|
|
17
|
+
/** The binary score assigned to the grade. */
|
|
12
18
|
binaryScore?: boolean;
|
|
19
|
+
/** The integer score assigned to the grade. */
|
|
13
20
|
intScore?: number;
|
|
21
|
+
/** The reasoning for the assigned score. */
|
|
14
22
|
reasoning?: string;
|
|
15
23
|
/** Indicates if a human should assign a grade. */
|
|
16
24
|
humanEval?: boolean;
|
|
17
25
|
/** The status of the grade. */
|
|
18
26
|
status?: Scorecard.ScoreStatus;
|
|
27
|
+
/** The error message if the grade was not created successfully. */
|
|
19
28
|
errorMessage?: string;
|
|
29
|
+
/** when the grade was created. */
|
|
20
30
|
createdAt?: Date;
|
|
31
|
+
/** when the grade was last updated. */
|
|
21
32
|
updatedAt?: Date;
|
|
22
33
|
}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
import * as Scorecard from "../index";
|
|
5
5
|
export interface PaginatedTestcaseResponse {
|
|
6
6
|
count: number;
|
|
7
|
+
/** The URL to fetch the next page of testcases. */
|
|
7
8
|
next?: string;
|
|
9
|
+
/** The URL to fetch the previous page of testcases. */
|
|
8
10
|
previous?: string;
|
|
9
11
|
/** The list of Testcases retrieved in this page. */
|
|
10
12
|
results: Scorecard.TestCase[];
|
package/api/types/Prompt.d.ts
CHANGED
package/api/types/Run.d.ts
CHANGED
|
@@ -3,18 +3,32 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface Run {
|
|
5
5
|
id?: number;
|
|
6
|
+
/** The creation date and time of the run. */
|
|
6
7
|
createdAt?: Date;
|
|
8
|
+
/** The last time the run was updated. */
|
|
7
9
|
updatedAt?: Date;
|
|
10
|
+
/** The start time of the run. */
|
|
8
11
|
executionStartTime?: Date;
|
|
12
|
+
/** The end time of the run. */
|
|
9
13
|
executionEndTime?: Date;
|
|
14
|
+
/** The testset that was executed in this run. */
|
|
10
15
|
testsetId?: number;
|
|
16
|
+
/** The current status of the run. */
|
|
11
17
|
status?: string;
|
|
18
|
+
/** The maximum number of testcases to run. */
|
|
12
19
|
limitTestcases?: number;
|
|
20
|
+
/** How the run was created. */
|
|
13
21
|
source?: string;
|
|
22
|
+
/** The model parameters used when generating the run. */
|
|
14
23
|
modelParams?: Record<string, unknown>;
|
|
24
|
+
/** Notes about the run. */
|
|
15
25
|
notes?: string;
|
|
26
|
+
/** The ID of the scoring configuration the run uses. */
|
|
16
27
|
scoringConfigId?: number;
|
|
28
|
+
/** The prompt template to be used while executing the run. */
|
|
17
29
|
promptTemplate?: string;
|
|
30
|
+
/** The start time of scoring the run's results. */
|
|
18
31
|
scoringStartTime?: Date;
|
|
32
|
+
/** The end time of scoring the run's results. */
|
|
19
33
|
scoringEndTime?: Date;
|
|
20
34
|
}
|
package/api/types/TestCase.d.ts
CHANGED
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Scorecard from "../index";
|
|
5
5
|
export interface TestCase {
|
|
6
|
+
/** The ID of the testcase. */
|
|
6
7
|
id?: number;
|
|
8
|
+
/** The creation date and time of the testcase. */
|
|
7
9
|
createdAt?: Date;
|
|
8
10
|
/** The ID of the testset the testcase belongs to. */
|
|
9
11
|
testsetId: number;
|
|
10
12
|
/** The user query for the testcase. */
|
|
11
13
|
userQuery: string;
|
|
14
|
+
/** The context for the testcase. */
|
|
12
15
|
context?: string;
|
|
16
|
+
/** The ideal response for the testcase. */
|
|
13
17
|
ideal?: string;
|
|
14
18
|
customInputs?: Record<string, Scorecard.TestCaseCustomInputsValue | undefined>;
|
|
15
19
|
customLabels?: Record<string, Scorecard.TestCaseCustomLabelsValue | undefined>;
|
|
@@ -4,19 +4,31 @@
|
|
|
4
4
|
import * as Scorecard from "../index";
|
|
5
5
|
export interface Testrecord {
|
|
6
6
|
id?: number;
|
|
7
|
+
/** The creation date and time of the testrecord. */
|
|
7
8
|
createdAt?: Date;
|
|
9
|
+
/** The ID of the run the testrecord belongs to. */
|
|
8
10
|
runId?: number;
|
|
11
|
+
/** The ID of the testset the testrecord belongs to. */
|
|
9
12
|
testsetId?: number;
|
|
13
|
+
/** The ID of the testcase the testrecord belongs to. */
|
|
10
14
|
testcaseId?: number;
|
|
15
|
+
/** The user query for the testrecord. */
|
|
11
16
|
userQuery?: string;
|
|
17
|
+
/** The context for the testrecord. */
|
|
12
18
|
context?: string;
|
|
19
|
+
/** The actual response of the model for the testrecord. */
|
|
13
20
|
modelResponse?: string;
|
|
21
|
+
/** The ideal response for the testrecord. */
|
|
14
22
|
ideal?: string;
|
|
15
23
|
customInputs?: Record<string, Scorecard.TestrecordCustomInputsValue | undefined>;
|
|
16
24
|
customLabels?: Record<string, Scorecard.TestrecordCustomLabelsValue | undefined>;
|
|
17
25
|
customOutputs?: Record<string, Scorecard.TestrecordCustomOutputsValue | undefined>;
|
|
26
|
+
/** The current status of the testrecord. */
|
|
18
27
|
status?: string;
|
|
28
|
+
/** The prompt used to generate the testrecord. */
|
|
19
29
|
prompt?: string;
|
|
30
|
+
/** The model parameters used when generating the testrecord. */
|
|
20
31
|
modelParams?: Record<string, Scorecard.TestrecordModelParamsValue | undefined>;
|
|
32
|
+
/** Debug information produced during the testrecord's generation. */
|
|
21
33
|
modelDebugInfo?: Record<string, Scorecard.TestrecordModelDebugInfoValue | undefined>;
|
|
22
34
|
}
|
package/api/types/Testset.d.ts
CHANGED
|
@@ -3,16 +3,27 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Scorecard from "../index";
|
|
5
5
|
export interface Testset {
|
|
6
|
+
/** The ID of the testset. */
|
|
6
7
|
id?: number;
|
|
8
|
+
/** The creation date and time of the testset. */
|
|
7
9
|
createdAt?: Date;
|
|
10
|
+
/** A human-readable name for the testset. This will be displayed in the UI. */
|
|
8
11
|
name?: string;
|
|
12
|
+
/** A description for the testset. */
|
|
9
13
|
description?: string;
|
|
14
|
+
/** Whether or not the testset uses retrieval. */
|
|
10
15
|
usingRetrieval?: boolean;
|
|
16
|
+
/** The method used to ingest the testset. */
|
|
11
17
|
ingestionMethod?: string;
|
|
18
|
+
/** The number of testcases in the testset. */
|
|
12
19
|
numTestcases?: number;
|
|
20
|
+
/** Whether or not the testset is published. */
|
|
13
21
|
published?: boolean;
|
|
22
|
+
/** The last time the testset was updated. */
|
|
14
23
|
updatedAt?: Date;
|
|
24
|
+
/** Whether or not the testset is archived. */
|
|
15
25
|
isArchived?: boolean;
|
|
26
|
+
/** The ID of the project the testset belongs to. */
|
|
16
27
|
projectId?: number;
|
|
17
28
|
customSchema?: Scorecard.CustomSchema;
|
|
18
29
|
}
|
|
@@ -97,7 +97,7 @@ class Prompt {
|
|
|
97
97
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
98
98
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/prompt"),
|
|
99
99
|
method: "POST",
|
|
100
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
100
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
101
101
|
contentType: "application/json",
|
|
102
102
|
body: yield serializers.PromptCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
103
103
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -189,7 +189,7 @@ class Prompt {
|
|
|
189
189
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
190
190
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/prompt/${encodeURIComponent(id)}`),
|
|
191
191
|
method: "GET",
|
|
192
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
192
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
193
193
|
contentType: "application/json",
|
|
194
194
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
195
195
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -280,7 +280,7 @@ class Prompt {
|
|
|
280
280
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
281
281
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/prompt/${encodeURIComponent(id)}`),
|
|
282
282
|
method: "DELETE",
|
|
283
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
283
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
284
284
|
contentType: "application/json",
|
|
285
285
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
286
286
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -370,7 +370,7 @@ class Prompt {
|
|
|
370
370
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
371
371
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/prompt/${encodeURIComponent(id)}`),
|
|
372
372
|
method: "PATCH",
|
|
373
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
373
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
374
374
|
contentType: "application/json",
|
|
375
375
|
body: yield serializers.PromptUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
376
376
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -462,7 +462,7 @@ class Prompt {
|
|
|
462
462
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
463
463
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/prompt/name/${encodeURIComponent(name)}`),
|
|
464
464
|
method: "GET",
|
|
465
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
465
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
466
466
|
contentType: "application/json",
|
|
467
467
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
468
468
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -69,7 +69,7 @@ class Run {
|
|
|
69
69
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
70
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, "v1/run"),
|
|
71
71
|
method: "POST",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
72
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
73
73
|
contentType: "application/json",
|
|
74
74
|
body: yield serializers.RunCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
75
75
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -161,7 +161,7 @@ class Run {
|
|
|
161
161
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
162
162
|
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)}`),
|
|
163
163
|
method: "GET",
|
|
164
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
164
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
165
165
|
contentType: "application/json",
|
|
166
166
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
167
167
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -253,7 +253,7 @@ class Run {
|
|
|
253
253
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
254
254
|
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)}/status`),
|
|
255
255
|
method: "PATCH",
|
|
256
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
256
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
257
257
|
contentType: "application/json",
|
|
258
258
|
body: yield serializers.UpdateStatusParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
259
259
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -69,7 +69,7 @@ class RunMetric {
|
|
|
69
69
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
70
70
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.ScorecardEnvironment.Default, `v1/run_metric/${encodeURIComponent(runId)}`),
|
|
71
71
|
method: "GET",
|
|
72
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
72
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
73
73
|
contentType: "application/json",
|
|
74
74
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
75
75
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -73,7 +73,7 @@ class Score {
|
|
|
73
73
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
74
74
|
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)}/score`),
|
|
75
75
|
method: "POST",
|
|
76
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
76
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
77
77
|
contentType: "application/json",
|
|
78
78
|
body: yield serializers.ScoreCreateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
79
79
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -168,7 +168,7 @@ class Score {
|
|
|
168
168
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
169
169
|
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)}/score/${encodeURIComponent(scoreId)}`),
|
|
170
170
|
method: "PATCH",
|
|
171
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.
|
|
171
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "scorecard-ai", "X-Fern-SDK-Version": "0.5.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
172
172
|
contentType: "application/json",
|
|
173
173
|
body: yield serializers.ScoreUpdateParams.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
174
174
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|