scorecard-ai 1.0.0-alpha.0 → 1.0.0-alpha.2
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/CHANGELOG.md +54 -0
- package/README.md +2 -2
- package/client.d.mts +13 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +13 -1
- package/client.d.ts.map +1 -1
- package/client.js +15 -3
- package/client.js.map +1 -1
- package/client.mjs +15 -3
- package/client.mjs.map +1 -1
- package/internal/utils/base64.d.mts.map +1 -1
- package/internal/utils/base64.d.ts.map +1 -1
- package/internal/utils/base64.js +8 -4
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +8 -4
- package/internal/utils/base64.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/execution-records.d.mts +62 -0
- package/resources/execution-records.d.mts.map +1 -0
- package/resources/execution-records.d.ts +62 -0
- package/resources/execution-records.d.ts.map +1 -0
- package/resources/execution-records.js +16 -0
- package/resources/execution-records.js.map +1 -0
- package/resources/execution-records.mjs +12 -0
- package/resources/execution-records.mjs.map +1 -0
- package/resources/index.d.mts +4 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/runs.d.mts +72 -0
- package/resources/runs.d.mts.map +1 -0
- package/resources/runs.d.ts +72 -0
- package/resources/runs.d.ts.map +1 -0
- package/resources/runs.js +22 -0
- package/resources/runs.js.map +1 -0
- package/resources/runs.mjs +18 -0
- package/resources/runs.mjs.map +1 -0
- package/resources/system-configs.d.mts +122 -0
- package/resources/system-configs.d.mts.map +1 -0
- package/resources/system-configs.d.ts +122 -0
- package/resources/system-configs.d.ts.map +1 -0
- package/resources/system-configs.js +50 -0
- package/resources/system-configs.js.map +1 -0
- package/resources/system-configs.mjs +46 -0
- package/resources/system-configs.mjs.map +1 -0
- package/resources/systems.d.mts +152 -0
- package/resources/systems.d.mts.map +1 -0
- package/resources/systems.d.ts +152 -0
- package/resources/systems.d.ts.map +1 -0
- package/resources/systems.js +70 -0
- package/resources/systems.js.map +1 -0
- package/resources/systems.mjs +66 -0
- package/resources/systems.mjs.map +1 -0
- package/resources/testcases.d.mts +11 -27
- package/resources/testcases.d.mts.map +1 -1
- package/resources/testcases.d.ts +11 -27
- package/resources/testcases.d.ts.map +1 -1
- package/resources/testcases.js +3 -3
- package/resources/testcases.js.map +1 -1
- package/resources/testcases.mjs +3 -3
- package/resources/testcases.mjs.map +1 -1
- package/resources/testsets.d.mts +12 -9
- package/resources/testsets.d.mts.map +1 -1
- package/resources/testsets.d.ts +12 -9
- package/resources/testsets.d.ts.map +1 -1
- package/src/client.ts +67 -3
- package/src/internal/utils/base64.ts +8 -6
- package/src/resources/execution-records.ts +85 -0
- package/src/resources/index.ts +23 -0
- package/src/resources/runs.ts +118 -0
- package/src/resources/system-configs.ts +170 -0
- package/src/resources/systems.ts +206 -0
- package/src/resources/testcases.ts +13 -36
- package/src/resources/testsets.ts +13 -10
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
export declare class SystemConfigs extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new configuration for a system.
|
|
8
|
+
*
|
|
9
|
+
* Each configuration contains specific parameter values that match the system's
|
|
10
|
+
* configSchema - things like model parameters, thresholds, or processing options.
|
|
11
|
+
* Once created, configurations cannot be modified, ensuring stable reference
|
|
12
|
+
* points for evaluations.
|
|
13
|
+
*
|
|
14
|
+
* When creating a configuration:
|
|
15
|
+
*
|
|
16
|
+
* - The 'config' object is validated against the parent system's configSchema
|
|
17
|
+
* - Configurations with validation errors are still stored, with errors included
|
|
18
|
+
* in the response
|
|
19
|
+
* - Validation errors indicate fields that don't match the schema but don't
|
|
20
|
+
* prevent creation
|
|
21
|
+
* - Having validation errors may affect how some evaluation metrics are calculated
|
|
22
|
+
*/
|
|
23
|
+
create(systemID: string, body: SystemConfigCreateParams, options?: RequestOptions): APIPromise<SystemConfig>;
|
|
24
|
+
/**
|
|
25
|
+
* Retrieve a paginated list of configurations for a specific system.
|
|
26
|
+
*
|
|
27
|
+
* System configurations provide concrete parameter values for a System Under Test,
|
|
28
|
+
* defining exactly how the system should be configured during an evaluation run.
|
|
29
|
+
*/
|
|
30
|
+
list(systemID: string, query?: SystemConfigListParams | null | undefined, options?: RequestOptions): PagePromise<SystemConfigsPaginatedResponse, SystemConfig>;
|
|
31
|
+
/**
|
|
32
|
+
* Retrieve a specific system configuration by ID.
|
|
33
|
+
*/
|
|
34
|
+
get(systemConfigID: string, params: SystemConfigGetParams, options?: RequestOptions): APIPromise<SystemConfig>;
|
|
35
|
+
}
|
|
36
|
+
export type SystemConfigsPaginatedResponse = PaginatedResponse<SystemConfig>;
|
|
37
|
+
/**
|
|
38
|
+
* A SystemConfig defines the specific settings for a System Under Test.
|
|
39
|
+
*
|
|
40
|
+
* Configurations contain parameter values that determine system behavior during
|
|
41
|
+
* evaluation. They are immutable snapshots - once created, they never change.
|
|
42
|
+
*
|
|
43
|
+
* When running evaluations, you reference a specific configId to establish which
|
|
44
|
+
* configuration to test.
|
|
45
|
+
*
|
|
46
|
+
* Configurations will be validated against the system's configSchema, with
|
|
47
|
+
* non-conforming values generating warnings.
|
|
48
|
+
*/
|
|
49
|
+
export interface SystemConfig {
|
|
50
|
+
/**
|
|
51
|
+
* The ID of the system configuration
|
|
52
|
+
*/
|
|
53
|
+
id: string;
|
|
54
|
+
/**
|
|
55
|
+
* The configuration of the system
|
|
56
|
+
*/
|
|
57
|
+
config: Record<string, unknown>;
|
|
58
|
+
/**
|
|
59
|
+
* The name of the system configuration
|
|
60
|
+
*/
|
|
61
|
+
name: string;
|
|
62
|
+
/**
|
|
63
|
+
* The ID of the system the configuration belongs to
|
|
64
|
+
*/
|
|
65
|
+
systemId: string;
|
|
66
|
+
/**
|
|
67
|
+
* Validation errors found in the configuration. If present, the configuration
|
|
68
|
+
* doesn't fully conform to its system's configSchema.
|
|
69
|
+
*/
|
|
70
|
+
validationErrors?: Array<SystemConfig.ValidationError>;
|
|
71
|
+
}
|
|
72
|
+
export declare namespace SystemConfig {
|
|
73
|
+
interface ValidationError {
|
|
74
|
+
/**
|
|
75
|
+
* Human-readable error description
|
|
76
|
+
*/
|
|
77
|
+
message: string;
|
|
78
|
+
/**
|
|
79
|
+
* JSON Pointer to the field with the validation error
|
|
80
|
+
*/
|
|
81
|
+
path: string;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export interface SystemConfigCreateParams {
|
|
85
|
+
/**
|
|
86
|
+
* The configuration of the system
|
|
87
|
+
*/
|
|
88
|
+
config: Record<string, unknown>;
|
|
89
|
+
/**
|
|
90
|
+
* The name of the system configuration
|
|
91
|
+
*/
|
|
92
|
+
name: string;
|
|
93
|
+
/**
|
|
94
|
+
* Validation errors found in the configuration. If present, the configuration
|
|
95
|
+
* doesn't fully conform to its system's configSchema.
|
|
96
|
+
*/
|
|
97
|
+
validationErrors?: Array<SystemConfigCreateParams.ValidationError>;
|
|
98
|
+
}
|
|
99
|
+
export declare namespace SystemConfigCreateParams {
|
|
100
|
+
interface ValidationError {
|
|
101
|
+
/**
|
|
102
|
+
* Human-readable error description
|
|
103
|
+
*/
|
|
104
|
+
message: string;
|
|
105
|
+
/**
|
|
106
|
+
* JSON Pointer to the field with the validation error
|
|
107
|
+
*/
|
|
108
|
+
path: string;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
export interface SystemConfigListParams extends PaginatedResponseParams {
|
|
112
|
+
}
|
|
113
|
+
export interface SystemConfigGetParams {
|
|
114
|
+
/**
|
|
115
|
+
* The ID of the system the configuration belongs to
|
|
116
|
+
*/
|
|
117
|
+
systemId: string;
|
|
118
|
+
}
|
|
119
|
+
export declare namespace SystemConfigs {
|
|
120
|
+
export { type SystemConfig as SystemConfig, type SystemConfigsPaginatedResponse as SystemConfigsPaginatedResponse, type SystemConfigCreateParams as SystemConfigCreateParams, type SystemConfigListParams as SystemConfigListParams, type SystemConfigGetParams as SystemConfigGetParams, };
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=system-configs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-configs.d.ts","sourceRoot":"","sources":["../src/resources/system-configs.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE;OAChE,EAAE,cAAc,EAAE;AAGzB,qBAAa,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,wBAAwB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;IAI3B;;;;;OAKG;IACH,IAAI,CACF,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,8BAA8B,EAAE,YAAY,CAAC;IAO5D;;OAEG;IACH,GAAG,CACD,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC;CAI5B;AAED,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAE7E;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAA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// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SystemConfigs = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class SystemConfigs extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new configuration for a system.
|
|
11
|
+
*
|
|
12
|
+
* Each configuration contains specific parameter values that match the system's
|
|
13
|
+
* configSchema - things like model parameters, thresholds, or processing options.
|
|
14
|
+
* Once created, configurations cannot be modified, ensuring stable reference
|
|
15
|
+
* points for evaluations.
|
|
16
|
+
*
|
|
17
|
+
* When creating a configuration:
|
|
18
|
+
*
|
|
19
|
+
* - The 'config' object is validated against the parent system's configSchema
|
|
20
|
+
* - Configurations with validation errors are still stored, with errors included
|
|
21
|
+
* in the response
|
|
22
|
+
* - Validation errors indicate fields that don't match the schema but don't
|
|
23
|
+
* prevent creation
|
|
24
|
+
* - Having validation errors may affect how some evaluation metrics are calculated
|
|
25
|
+
*/
|
|
26
|
+
create(systemID, body, options) {
|
|
27
|
+
return this._client.post((0, path_1.path) `/systems/${systemID}/configs`, { body, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Retrieve a paginated list of configurations for a specific system.
|
|
31
|
+
*
|
|
32
|
+
* System configurations provide concrete parameter values for a System Under Test,
|
|
33
|
+
* defining exactly how the system should be configured during an evaluation run.
|
|
34
|
+
*/
|
|
35
|
+
list(systemID, query = {}, options) {
|
|
36
|
+
return this._client.getAPIList((0, path_1.path) `/systems/${systemID}/configs`, (pagination_1.PaginatedResponse), {
|
|
37
|
+
query,
|
|
38
|
+
...options,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Retrieve a specific system configuration by ID.
|
|
43
|
+
*/
|
|
44
|
+
get(systemConfigID, params, options) {
|
|
45
|
+
const { systemId } = params;
|
|
46
|
+
return this._client.get((0, path_1.path) `/systems/${systemId}/configs/${systemConfigID}`, options);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.SystemConfigs = SystemConfigs;
|
|
50
|
+
//# sourceMappingURL=system-configs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-configs.js","sourceRoot":"","sources":["../src/resources/system-configs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAkG;AAElG,oDAA8C;AAE9C,MAAa,aAAc,SAAQ,sBAAW;IAC5C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,QAAgB,EAChB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,QAAgB,EAChB,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,UAAU,EAAE,CAAA,8BAA+B,CAAA,EAAE;YAClG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CACD,cAAsB,EACtB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,YAAY,QAAQ,YAAY,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;CACF;AAtDD,sCAsDC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { PaginatedResponse } from "../core/pagination.mjs";
|
|
4
|
+
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
export class SystemConfigs extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new configuration for a system.
|
|
8
|
+
*
|
|
9
|
+
* Each configuration contains specific parameter values that match the system's
|
|
10
|
+
* configSchema - things like model parameters, thresholds, or processing options.
|
|
11
|
+
* Once created, configurations cannot be modified, ensuring stable reference
|
|
12
|
+
* points for evaluations.
|
|
13
|
+
*
|
|
14
|
+
* When creating a configuration:
|
|
15
|
+
*
|
|
16
|
+
* - The 'config' object is validated against the parent system's configSchema
|
|
17
|
+
* - Configurations with validation errors are still stored, with errors included
|
|
18
|
+
* in the response
|
|
19
|
+
* - Validation errors indicate fields that don't match the schema but don't
|
|
20
|
+
* prevent creation
|
|
21
|
+
* - Having validation errors may affect how some evaluation metrics are calculated
|
|
22
|
+
*/
|
|
23
|
+
create(systemID, body, options) {
|
|
24
|
+
return this._client.post(path `/systems/${systemID}/configs`, { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve a paginated list of configurations for a specific system.
|
|
28
|
+
*
|
|
29
|
+
* System configurations provide concrete parameter values for a System Under Test,
|
|
30
|
+
* defining exactly how the system should be configured during an evaluation run.
|
|
31
|
+
*/
|
|
32
|
+
list(systemID, query = {}, options) {
|
|
33
|
+
return this._client.getAPIList(path `/systems/${systemID}/configs`, (PaginatedResponse), {
|
|
34
|
+
query,
|
|
35
|
+
...options,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Retrieve a specific system configuration by ID.
|
|
40
|
+
*/
|
|
41
|
+
get(systemConfigID, params, options) {
|
|
42
|
+
const { systemId } = params;
|
|
43
|
+
return this._client.get(path `/systems/${systemId}/configs/${systemConfigID}`, options);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=system-configs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-configs.mjs","sourceRoot":"","sources":["../src/resources/system-configs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAe,iBAAiB,EAAgC;OAEhE,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,aAAc,SAAQ,WAAW;IAC5C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,QAAgB,EAChB,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,YAAY,QAAQ,UAAU,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;OAKG;IACH,IAAI,CACF,QAAgB,EAChB,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,YAAY,QAAQ,UAAU,EAAE,CAAA,iBAA+B,CAAA,EAAE;YAClG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,GAAG,CACD,cAAsB,EACtB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,YAAY,QAAQ,YAAY,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;CACF"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
+
import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "../core/pagination.mjs";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
+
export declare class Systems extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new system definition that specifies the interface contracts for a
|
|
8
|
+
* component you want to evaluate.
|
|
9
|
+
*
|
|
10
|
+
* A system acts as a template that defines three key contracts through JSON
|
|
11
|
+
* Schemas:
|
|
12
|
+
*
|
|
13
|
+
* 1. Input Schema: What data your system accepts (e.g., user queries, context
|
|
14
|
+
* documents)
|
|
15
|
+
* 2. Output Schema: What data your system produces (e.g., responses, confidence
|
|
16
|
+
* scores)
|
|
17
|
+
* 3. Config Schema: What parameters can be adjusted (e.g., model selection,
|
|
18
|
+
* temperature)
|
|
19
|
+
*
|
|
20
|
+
* This separation lets you evaluate any system as a black box, focusing on its
|
|
21
|
+
* interface rather than implementation details.
|
|
22
|
+
*/
|
|
23
|
+
create(projectID: string, body: SystemCreateParams, options?: RequestOptions): APIPromise<System>;
|
|
24
|
+
/**
|
|
25
|
+
* Update an existing system definition. Only the fields provided in the request
|
|
26
|
+
* body will be updated. If a field is provided, the new content will replace the
|
|
27
|
+
* existing content. If a field is not provided, the existing content will remain
|
|
28
|
+
* unchanged.
|
|
29
|
+
*
|
|
30
|
+
* When updating schemas:
|
|
31
|
+
*
|
|
32
|
+
* - The system will accept your changes regardless of compatibility with existing
|
|
33
|
+
* configurations
|
|
34
|
+
* - Schema updates won't invalidate existing evaluations or configurations
|
|
35
|
+
* - For significant redesigns, creating a new system definition provides a cleaner
|
|
36
|
+
* separation
|
|
37
|
+
*/
|
|
38
|
+
update(systemID: string, body?: SystemUpdateParams | null | undefined, options?: RequestOptions): APIPromise<System>;
|
|
39
|
+
/**
|
|
40
|
+
* Retrieve a paginated list of all systems. Systems are ordered by creation date.
|
|
41
|
+
*/
|
|
42
|
+
list(projectID: string, query?: SystemListParams | null | undefined, options?: RequestOptions): PagePromise<SystemsPaginatedResponse, System>;
|
|
43
|
+
/**
|
|
44
|
+
* Delete a system definition by ID. This will not delete associated system
|
|
45
|
+
* configurations.
|
|
46
|
+
*/
|
|
47
|
+
delete(systemID: string, options?: RequestOptions): APIPromise<SystemDeleteResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Retrieve a specific system by ID.
|
|
50
|
+
*/
|
|
51
|
+
get(systemID: string, options?: RequestOptions): APIPromise<System>;
|
|
52
|
+
}
|
|
53
|
+
export type SystemsPaginatedResponse = PaginatedResponse<System>;
|
|
54
|
+
/**
|
|
55
|
+
* A System Under Test (SUT) defines the interface to a component or service you
|
|
56
|
+
* want to evaluate.
|
|
57
|
+
*
|
|
58
|
+
* It specifies three contracts through schemas:
|
|
59
|
+
*
|
|
60
|
+
* - inputSchema: The structure of data the system accepts
|
|
61
|
+
* - outputSchema: The structure of data the system produces
|
|
62
|
+
* - configSchema: The parameters that modify system behavior
|
|
63
|
+
*
|
|
64
|
+
* This abstraction lets you evaluate any system as a black box, focusing on its
|
|
65
|
+
* interface rather than implementation details. It's particularly useful for
|
|
66
|
+
* systems with variable outputs or complex internal state.
|
|
67
|
+
*
|
|
68
|
+
* Systems are templates - to run evaluations, pair them with a SystemConfig that
|
|
69
|
+
* provides specific parameter values.
|
|
70
|
+
*/
|
|
71
|
+
export interface System {
|
|
72
|
+
/**
|
|
73
|
+
* The ID of the system
|
|
74
|
+
*/
|
|
75
|
+
id: string;
|
|
76
|
+
/**
|
|
77
|
+
* The schema of the system's configuration
|
|
78
|
+
*/
|
|
79
|
+
configSchema: Record<string, unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* The description of the system
|
|
82
|
+
*/
|
|
83
|
+
description: string;
|
|
84
|
+
/**
|
|
85
|
+
* The schema of the system's inputs
|
|
86
|
+
*/
|
|
87
|
+
inputSchema: Record<string, unknown>;
|
|
88
|
+
/**
|
|
89
|
+
* The name of the system
|
|
90
|
+
*/
|
|
91
|
+
name: string;
|
|
92
|
+
/**
|
|
93
|
+
* The schema of the system's outputs
|
|
94
|
+
*/
|
|
95
|
+
outputSchema: Record<string, unknown>;
|
|
96
|
+
}
|
|
97
|
+
export interface SystemDeleteResponse {
|
|
98
|
+
/**
|
|
99
|
+
* Whether the deletion was successful
|
|
100
|
+
*/
|
|
101
|
+
success: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface SystemCreateParams {
|
|
104
|
+
/**
|
|
105
|
+
* The schema of the system's configuration
|
|
106
|
+
*/
|
|
107
|
+
configSchema: Record<string, unknown>;
|
|
108
|
+
/**
|
|
109
|
+
* The description of the system
|
|
110
|
+
*/
|
|
111
|
+
description: string;
|
|
112
|
+
/**
|
|
113
|
+
* The schema of the system's inputs
|
|
114
|
+
*/
|
|
115
|
+
inputSchema: Record<string, unknown>;
|
|
116
|
+
/**
|
|
117
|
+
* The name of the system
|
|
118
|
+
*/
|
|
119
|
+
name: string;
|
|
120
|
+
/**
|
|
121
|
+
* The schema of the system's outputs
|
|
122
|
+
*/
|
|
123
|
+
outputSchema: Record<string, unknown>;
|
|
124
|
+
}
|
|
125
|
+
export interface SystemUpdateParams {
|
|
126
|
+
/**
|
|
127
|
+
* The schema of the system's configuration
|
|
128
|
+
*/
|
|
129
|
+
configSchema?: Record<string, unknown>;
|
|
130
|
+
/**
|
|
131
|
+
* The description of the system
|
|
132
|
+
*/
|
|
133
|
+
description?: string;
|
|
134
|
+
/**
|
|
135
|
+
* The schema of the system's inputs
|
|
136
|
+
*/
|
|
137
|
+
inputSchema?: Record<string, unknown>;
|
|
138
|
+
/**
|
|
139
|
+
* The name of the system
|
|
140
|
+
*/
|
|
141
|
+
name?: string;
|
|
142
|
+
/**
|
|
143
|
+
* The schema of the system's outputs
|
|
144
|
+
*/
|
|
145
|
+
outputSchema?: Record<string, unknown>;
|
|
146
|
+
}
|
|
147
|
+
export interface SystemListParams extends PaginatedResponseParams {
|
|
148
|
+
}
|
|
149
|
+
export declare namespace Systems {
|
|
150
|
+
export { type System as System, type SystemDeleteResponse as SystemDeleteResponse, type SystemsPaginatedResponse as SystemsPaginatedResponse, type SystemCreateParams as SystemCreateParams, type SystemUpdateParams as SystemUpdateParams, type SystemListParams as SystemListParams, };
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=systems.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,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { PagePromise, PaginatedResponse, type PaginatedResponseParams } from "../core/pagination.js";
|
|
4
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
5
|
+
export declare class Systems extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* Create a new system definition that specifies the interface contracts for a
|
|
8
|
+
* component you want to evaluate.
|
|
9
|
+
*
|
|
10
|
+
* A system acts as a template that defines three key contracts through JSON
|
|
11
|
+
* Schemas:
|
|
12
|
+
*
|
|
13
|
+
* 1. Input Schema: What data your system accepts (e.g., user queries, context
|
|
14
|
+
* documents)
|
|
15
|
+
* 2. Output Schema: What data your system produces (e.g., responses, confidence
|
|
16
|
+
* scores)
|
|
17
|
+
* 3. Config Schema: What parameters can be adjusted (e.g., model selection,
|
|
18
|
+
* temperature)
|
|
19
|
+
*
|
|
20
|
+
* This separation lets you evaluate any system as a black box, focusing on its
|
|
21
|
+
* interface rather than implementation details.
|
|
22
|
+
*/
|
|
23
|
+
create(projectID: string, body: SystemCreateParams, options?: RequestOptions): APIPromise<System>;
|
|
24
|
+
/**
|
|
25
|
+
* Update an existing system definition. Only the fields provided in the request
|
|
26
|
+
* body will be updated. If a field is provided, the new content will replace the
|
|
27
|
+
* existing content. If a field is not provided, the existing content will remain
|
|
28
|
+
* unchanged.
|
|
29
|
+
*
|
|
30
|
+
* When updating schemas:
|
|
31
|
+
*
|
|
32
|
+
* - The system will accept your changes regardless of compatibility with existing
|
|
33
|
+
* configurations
|
|
34
|
+
* - Schema updates won't invalidate existing evaluations or configurations
|
|
35
|
+
* - For significant redesigns, creating a new system definition provides a cleaner
|
|
36
|
+
* separation
|
|
37
|
+
*/
|
|
38
|
+
update(systemID: string, body?: SystemUpdateParams | null | undefined, options?: RequestOptions): APIPromise<System>;
|
|
39
|
+
/**
|
|
40
|
+
* Retrieve a paginated list of all systems. Systems are ordered by creation date.
|
|
41
|
+
*/
|
|
42
|
+
list(projectID: string, query?: SystemListParams | null | undefined, options?: RequestOptions): PagePromise<SystemsPaginatedResponse, System>;
|
|
43
|
+
/**
|
|
44
|
+
* Delete a system definition by ID. This will not delete associated system
|
|
45
|
+
* configurations.
|
|
46
|
+
*/
|
|
47
|
+
delete(systemID: string, options?: RequestOptions): APIPromise<SystemDeleteResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Retrieve a specific system by ID.
|
|
50
|
+
*/
|
|
51
|
+
get(systemID: string, options?: RequestOptions): APIPromise<System>;
|
|
52
|
+
}
|
|
53
|
+
export type SystemsPaginatedResponse = PaginatedResponse<System>;
|
|
54
|
+
/**
|
|
55
|
+
* A System Under Test (SUT) defines the interface to a component or service you
|
|
56
|
+
* want to evaluate.
|
|
57
|
+
*
|
|
58
|
+
* It specifies three contracts through schemas:
|
|
59
|
+
*
|
|
60
|
+
* - inputSchema: The structure of data the system accepts
|
|
61
|
+
* - outputSchema: The structure of data the system produces
|
|
62
|
+
* - configSchema: The parameters that modify system behavior
|
|
63
|
+
*
|
|
64
|
+
* This abstraction lets you evaluate any system as a black box, focusing on its
|
|
65
|
+
* interface rather than implementation details. It's particularly useful for
|
|
66
|
+
* systems with variable outputs or complex internal state.
|
|
67
|
+
*
|
|
68
|
+
* Systems are templates - to run evaluations, pair them with a SystemConfig that
|
|
69
|
+
* provides specific parameter values.
|
|
70
|
+
*/
|
|
71
|
+
export interface System {
|
|
72
|
+
/**
|
|
73
|
+
* The ID of the system
|
|
74
|
+
*/
|
|
75
|
+
id: string;
|
|
76
|
+
/**
|
|
77
|
+
* The schema of the system's configuration
|
|
78
|
+
*/
|
|
79
|
+
configSchema: Record<string, unknown>;
|
|
80
|
+
/**
|
|
81
|
+
* The description of the system
|
|
82
|
+
*/
|
|
83
|
+
description: string;
|
|
84
|
+
/**
|
|
85
|
+
* The schema of the system's inputs
|
|
86
|
+
*/
|
|
87
|
+
inputSchema: Record<string, unknown>;
|
|
88
|
+
/**
|
|
89
|
+
* The name of the system
|
|
90
|
+
*/
|
|
91
|
+
name: string;
|
|
92
|
+
/**
|
|
93
|
+
* The schema of the system's outputs
|
|
94
|
+
*/
|
|
95
|
+
outputSchema: Record<string, unknown>;
|
|
96
|
+
}
|
|
97
|
+
export interface SystemDeleteResponse {
|
|
98
|
+
/**
|
|
99
|
+
* Whether the deletion was successful
|
|
100
|
+
*/
|
|
101
|
+
success: boolean;
|
|
102
|
+
}
|
|
103
|
+
export interface SystemCreateParams {
|
|
104
|
+
/**
|
|
105
|
+
* The schema of the system's configuration
|
|
106
|
+
*/
|
|
107
|
+
configSchema: Record<string, unknown>;
|
|
108
|
+
/**
|
|
109
|
+
* The description of the system
|
|
110
|
+
*/
|
|
111
|
+
description: string;
|
|
112
|
+
/**
|
|
113
|
+
* The schema of the system's inputs
|
|
114
|
+
*/
|
|
115
|
+
inputSchema: Record<string, unknown>;
|
|
116
|
+
/**
|
|
117
|
+
* The name of the system
|
|
118
|
+
*/
|
|
119
|
+
name: string;
|
|
120
|
+
/**
|
|
121
|
+
* The schema of the system's outputs
|
|
122
|
+
*/
|
|
123
|
+
outputSchema: Record<string, unknown>;
|
|
124
|
+
}
|
|
125
|
+
export interface SystemUpdateParams {
|
|
126
|
+
/**
|
|
127
|
+
* The schema of the system's configuration
|
|
128
|
+
*/
|
|
129
|
+
configSchema?: Record<string, unknown>;
|
|
130
|
+
/**
|
|
131
|
+
* The description of the system
|
|
132
|
+
*/
|
|
133
|
+
description?: string;
|
|
134
|
+
/**
|
|
135
|
+
* The schema of the system's inputs
|
|
136
|
+
*/
|
|
137
|
+
inputSchema?: Record<string, unknown>;
|
|
138
|
+
/**
|
|
139
|
+
* The name of the system
|
|
140
|
+
*/
|
|
141
|
+
name?: string;
|
|
142
|
+
/**
|
|
143
|
+
* The schema of the system's outputs
|
|
144
|
+
*/
|
|
145
|
+
outputSchema?: Record<string, unknown>;
|
|
146
|
+
}
|
|
147
|
+
export interface SystemListParams extends PaginatedResponseParams {
|
|
148
|
+
}
|
|
149
|
+
export declare namespace Systems {
|
|
150
|
+
export { type System as System, type SystemDeleteResponse as SystemDeleteResponse, type SystemsPaginatedResponse as SystemsPaginatedResponse, type SystemCreateParams as SystemCreateParams, type SystemUpdateParams as SystemUpdateParams, type SystemListParams as SystemListParams, };
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=systems.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"systems.d.ts","sourceRoot":"","sources":["../src/resources/systems.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE;OAChE,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAIjG;;;;;;;;;;;;;OAaG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,kBAAkB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,MAAM,CAAC;IAIrB;;OAEG;IACH,IAAI,CACF,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,wBAAwB,EAAE,MAAM,CAAC;IAOhD;;;OAGG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAA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OAAO,CAAC,CAAC;IAEtC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;CAAG;AAEpE,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Systems = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../core/pagination.js");
|
|
7
|
+
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
class Systems extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new system definition that specifies the interface contracts for a
|
|
11
|
+
* component you want to evaluate.
|
|
12
|
+
*
|
|
13
|
+
* A system acts as a template that defines three key contracts through JSON
|
|
14
|
+
* Schemas:
|
|
15
|
+
*
|
|
16
|
+
* 1. Input Schema: What data your system accepts (e.g., user queries, context
|
|
17
|
+
* documents)
|
|
18
|
+
* 2. Output Schema: What data your system produces (e.g., responses, confidence
|
|
19
|
+
* scores)
|
|
20
|
+
* 3. Config Schema: What parameters can be adjusted (e.g., model selection,
|
|
21
|
+
* temperature)
|
|
22
|
+
*
|
|
23
|
+
* This separation lets you evaluate any system as a black box, focusing on its
|
|
24
|
+
* interface rather than implementation details.
|
|
25
|
+
*/
|
|
26
|
+
create(projectID, body, options) {
|
|
27
|
+
return this._client.post((0, path_1.path) `/projects/${projectID}/systems`, { body, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Update an existing system definition. Only the fields provided in the request
|
|
31
|
+
* body will be updated. If a field is provided, the new content will replace the
|
|
32
|
+
* existing content. If a field is not provided, the existing content will remain
|
|
33
|
+
* unchanged.
|
|
34
|
+
*
|
|
35
|
+
* When updating schemas:
|
|
36
|
+
*
|
|
37
|
+
* - The system will accept your changes regardless of compatibility with existing
|
|
38
|
+
* configurations
|
|
39
|
+
* - Schema updates won't invalidate existing evaluations or configurations
|
|
40
|
+
* - For significant redesigns, creating a new system definition provides a cleaner
|
|
41
|
+
* separation
|
|
42
|
+
*/
|
|
43
|
+
update(systemID, body = {}, options) {
|
|
44
|
+
return this._client.patch((0, path_1.path) `/systems/${systemID}`, { body, ...options });
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Retrieve a paginated list of all systems. Systems are ordered by creation date.
|
|
48
|
+
*/
|
|
49
|
+
list(projectID, query = {}, options) {
|
|
50
|
+
return this._client.getAPIList((0, path_1.path) `/projects/${projectID}/systems`, (pagination_1.PaginatedResponse), {
|
|
51
|
+
query,
|
|
52
|
+
...options,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Delete a system definition by ID. This will not delete associated system
|
|
57
|
+
* configurations.
|
|
58
|
+
*/
|
|
59
|
+
delete(systemID, options) {
|
|
60
|
+
return this._client.delete((0, path_1.path) `/systems/${systemID}`, options);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Retrieve a specific system by ID.
|
|
64
|
+
*/
|
|
65
|
+
get(systemID, options) {
|
|
66
|
+
return this._client.get((0, path_1.path) `/systems/${systemID}`, options);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.Systems = Systems;
|
|
70
|
+
//# sourceMappingURL=systems.js.map
|
|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