Skip to content

Commit 8d864ff

Browse files
feat: convert Benchmarks API to use FastAPI router
1 parent 515d952 commit 8d864ff

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
@@ -58,6 +58,9 @@ export class Benchmarks extends APIResource {
5858
* A benchmark resource for evaluating model performance.
5959
*/
6060
export interface Benchmark {
61+
/**
62+
* Identifier of the dataset to use for the benchmark evaluation.
63+
*/
6164
dataset_id: string;
6265

6366
/**
@@ -70,10 +73,13 @@ export interface Benchmark {
7073
*/
7174
provider_id: string;
7275

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

7581
/**
76-
* Metadata for this evaluation task
82+
* Metadata for this evaluation task.
7783
*/
7884
metadata?: { [key: string]: unknown };
7985

@@ -82,26 +88,56 @@ export interface Benchmark {
8288
*/
8389
provider_resource_id?: string | null;
8490

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

97+
/**
98+
* Response containing a list of benchmark objects.
99+
*/
88100
export interface ListBenchmarksResponse {
101+
/**
102+
* List of benchmark objects.
103+
*/
89104
data: BenchmarkListResponse;
90105
}
91106

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

94112
export interface BenchmarkRegisterParams {
113+
/**
114+
* The ID of the benchmark to register.
115+
*/
95116
benchmark_id: string;
96117

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

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

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

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

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

0 commit comments

Comments
 (0)