Skip to content

Commit bcc19bb

Browse files
feat: convert Benchmarks API to use FastAPI router
1 parent b5ea21d commit bcc19bb

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 103
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-418ccf3126ab086a66c822c60204b95ef3192ffa64340bd3a1537ae46b830892.yml
3-
openapi_spec_hash: 885b75e847506a930b709eb630535912
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-04657ade6bdb9c2a493a086f2607e98c97da7d04c0b0e7d5a53fd60eff062bd2.yml
3+
openapi_spec_hash: 56d411cdfeec6daae5ac7ea0e74c6217
44
config_hash: 96aa17ff0395152d8d548b1d1e58b613

src/resources/alpha/benchmarks.ts

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export class Benchmarks extends APIResource {
5959
* A benchmark resource for evaluating model performance.
6060
*/
6161
export interface Benchmark {
62+
/**
63+
* Identifier of the dataset to use for the benchmark evaluation.
64+
*/
6265
dataset_id: string;
6366

6467
/**
@@ -71,10 +74,13 @@ export interface Benchmark {
7174
*/
7275
provider_id: string;
7376

77+
/**
78+
* List of scoring function identifiers to apply during evaluation.
79+
*/
7480
scoring_functions: Array<string>;
7581

7682
/**
77-
* Metadata for this evaluation task
83+
* Metadata for this evaluation task.
7884
*/
7985
metadata?: { [key: string]: unknown };
8086

@@ -83,26 +89,56 @@ export interface Benchmark {
8389
*/
8490
provider_resource_id?: string | null;
8591

92+
/**
93+
* The resource type, always benchmark.
94+
*/
8695
type?: 'benchmark';
8796
}
8897

98+
/**
99+
* Response containing a list of benchmark objects.
100+
*/
89101
export interface ListBenchmarksResponse {
102+
/**
103+
* List of benchmark objects.
104+
*/
90105
data: BenchmarkListResponse;
91106
}
92107

108+
/**
109+
* List of benchmark objects.
110+
*/
93111
export type BenchmarkListResponse = Array<Benchmark>;
94112

95113
export interface BenchmarkRegisterParams {
114+
/**
115+
* The ID of the benchmark to register.
116+
*/
96117
benchmark_id: string;
97118

119+
/**
120+
* The ID of the dataset to use for the benchmark.
121+
*/
98122
dataset_id: string;
99123

124+
/**
125+
* The scoring functions to use for the benchmark.
126+
*/
100127
scoring_functions: Array<string>;
101128

129+
/**
130+
* The metadata to use for the benchmark.
131+
*/
102132
metadata?: { [key: string]: unknown } | null;
103133

134+
/**
135+
* The ID of the provider benchmark to use for the benchmark.
136+
*/
104137
provider_benchmark_id?: string | null;
105138

139+
/**
140+
* The ID of the provider to use for the benchmark.
141+
*/
106142
provider_id?: string | null;
107143
}
108144

0 commit comments

Comments
 (0)