Skip to content

Commit 7d2e375

Browse files
feat(api): manual updates
1 parent 0302d54 commit 7d2e375

File tree

8 files changed

+48
-47
lines changed

8 files changed

+48
-47
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 104
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-97b91eca4a3ff251edc02636b1a638866675d6c1abd46cd9fc18bc50a1de9656.yml
33
openapi_spec_hash: 7302f1aa50090e3de78e34c184371267
4-
config_hash: 364c8cc514fe5aa69bd24c7f3721985b
4+
config_hash: a3829dbdaa491194d01f399784d532cd

api.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -350,20 +350,6 @@ Methods:
350350
- <code title="get /v1/scoring-functions">client.scoringFunctions.<a href="./src/resources/scoring-functions.ts">list</a>() -> ScoringFunctionListResponse</code>
351351
- <code title="post /v1/scoring-functions">client.scoringFunctions.<a href="./src/resources/scoring-functions.ts">register</a>({ ...params }) -> void</code>
352352

353-
# Benchmarks
354-
355-
Types:
356-
357-
- <code><a href="./src/resources/benchmarks.ts">Benchmark</a></code>
358-
- <code><a href="./src/resources/benchmarks.ts">ListBenchmarksResponse</a></code>
359-
- <code><a href="./src/resources/benchmarks.ts">BenchmarkListResponse</a></code>
360-
361-
Methods:
362-
363-
- <code title="get /v1alpha/eval/benchmarks/{benchmark_id}">client.benchmarks.<a href="./src/resources/benchmarks.ts">retrieve</a>(benchmarkId) -> Benchmark</code>
364-
- <code title="get /v1alpha/eval/benchmarks">client.benchmarks.<a href="./src/resources/benchmarks.ts">list</a>() -> BenchmarkListResponse</code>
365-
- <code title="post /v1alpha/eval/benchmarks">client.benchmarks.<a href="./src/resources/benchmarks.ts">register</a>({ ...params }) -> void</code>
366-
367353
# Files
368354

369355
Types:
@@ -421,6 +407,20 @@ Methods:
421407
- <code title="post /v1alpha/post-training/job/cancel">client.alpha.postTraining.job.<a href="./src/resources/alpha/post-training/job.ts">cancel</a>({ ...params }) -> void</code>
422408
- <code title="get /v1alpha/post-training/job/status">client.alpha.postTraining.job.<a href="./src/resources/alpha/post-training/job.ts">status</a>({ ...params }) -> JobStatusResponse</code>
423409

410+
## Benchmarks
411+
412+
Types:
413+
414+
- <code><a href="./src/resources/alpha/benchmarks.ts">Benchmark</a></code>
415+
- <code><a href="./src/resources/alpha/benchmarks.ts">ListBenchmarksResponse</a></code>
416+
- <code><a href="./src/resources/alpha/benchmarks.ts">BenchmarkListResponse</a></code>
417+
418+
Methods:
419+
420+
- <code title="get /v1alpha/eval/benchmarks/{benchmark_id}">client.alpha.benchmarks.<a href="./src/resources/alpha/benchmarks.ts">retrieve</a>(benchmarkId) -> Benchmark</code>
421+
- <code title="get /v1alpha/eval/benchmarks">client.alpha.benchmarks.<a href="./src/resources/alpha/benchmarks.ts">list</a>() -> BenchmarkListResponse</code>
422+
- <code title="post /v1alpha/eval/benchmarks">client.alpha.benchmarks.<a href="./src/resources/alpha/benchmarks.ts">register</a>({ ...params }) -> void</code>
423+
424424
## Eval
425425

426426
Types:

src/index.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ import {
1313
} from './pagination';
1414
import * as Uploads from './uploads';
1515
import * as API from './resources/index';
16-
import {
17-
Benchmark,
18-
BenchmarkListResponse,
19-
BenchmarkRegisterParams,
20-
Benchmarks,
21-
ListBenchmarksResponse,
22-
} from './resources/benchmarks';
2316
import {
2417
CompletionCreateParams,
2518
CompletionCreateParamsNonStreaming,
@@ -264,7 +257,6 @@ export class LlamaStackClient extends Core.APIClient {
264257
syntheticDataGeneration: API.SyntheticDataGeneration = new API.SyntheticDataGeneration(this);
265258
scoring: API.Scoring = new API.Scoring(this);
266259
scoringFunctions: API.ScoringFunctions = new API.ScoringFunctions(this);
267-
benchmarks: API.Benchmarks = new API.Benchmarks(this);
268260
files: API.Files = new API.Files(this);
269261
alpha: API.Alpha = new API.Alpha(this);
270262
beta: API.Beta = new API.Beta(this);
@@ -341,7 +333,6 @@ LlamaStackClient.Shields = Shields;
341333
LlamaStackClient.SyntheticDataGeneration = SyntheticDataGeneration;
342334
LlamaStackClient.Scoring = Scoring;
343335
LlamaStackClient.ScoringFunctions = ScoringFunctions;
344-
LlamaStackClient.Benchmarks = Benchmarks;
345336
LlamaStackClient.Files = Files;
346337
LlamaStackClient.FilesOpenAICursorPage = FilesOpenAICursorPage;
347338
LlamaStackClient.Alpha = Alpha;
@@ -509,14 +500,6 @@ export declare namespace LlamaStackClient {
509500
type ScoringFunctionRegisterParams as ScoringFunctionRegisterParams,
510501
};
511502

512-
export {
513-
Benchmarks as Benchmarks,
514-
type Benchmark as Benchmark,
515-
type ListBenchmarksResponse as ListBenchmarksResponse,
516-
type BenchmarkListResponse as BenchmarkListResponse,
517-
type BenchmarkRegisterParams as BenchmarkRegisterParams,
518-
};
519-
520503
export {
521504
Files as Files,
522505
type DeleteFileResponse as DeleteFileResponse,

src/resources/alpha/alpha.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
import { APIResource } from '../../resource';
4+
import * as BenchmarksAPI from './benchmarks';
5+
import {
6+
Benchmark,
7+
BenchmarkListResponse,
8+
BenchmarkRegisterParams,
9+
Benchmarks,
10+
ListBenchmarksResponse,
11+
} from './benchmarks';
412
import * as InferenceAPI from './inference';
513
import { Inference, InferenceRerankParams, InferenceRerankResponse } from './inference';
614
import * as AgentsAPI from './agents/agents';
@@ -41,12 +49,14 @@ import {
4149
export class Alpha extends APIResource {
4250
inference: InferenceAPI.Inference = new InferenceAPI.Inference(this._client);
4351
postTraining: PostTrainingAPI.PostTraining = new PostTrainingAPI.PostTraining(this._client);
52+
benchmarks: BenchmarksAPI.Benchmarks = new BenchmarksAPI.Benchmarks(this._client);
4453
eval: EvalAPI.Eval = new EvalAPI.Eval(this._client);
4554
agents: AgentsAPI.Agents = new AgentsAPI.Agents(this._client);
4655
}
4756

4857
Alpha.Inference = Inference;
4958
Alpha.PostTraining = PostTraining;
59+
Alpha.Benchmarks = Benchmarks;
5060
Alpha.Eval = Eval;
5161
Alpha.Agents = Agents;
5262

@@ -66,6 +76,14 @@ export declare namespace Alpha {
6676
type PostTrainingSupervisedFineTuneParams as PostTrainingSupervisedFineTuneParams,
6777
};
6878

79+
export {
80+
Benchmarks as Benchmarks,
81+
type Benchmark as Benchmark,
82+
type ListBenchmarksResponse as ListBenchmarksResponse,
83+
type BenchmarkListResponse as BenchmarkListResponse,
84+
type BenchmarkRegisterParams as BenchmarkRegisterParams,
85+
};
86+
6987
export {
7088
Eval as Eval,
7189
type BenchmarkConfig as BenchmarkConfig,

src/resources/benchmarks.ts renamed to src/resources/alpha/benchmarks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
import { APIResource } from '../resource';
4-
import * as Core from '../core';
3+
import { APIResource } from '../../resource';
4+
import * as Core from '../../core';
55

66
export class Benchmarks extends APIResource {
77
/**

src/resources/alpha/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ export {
1414
type AgentListParams,
1515
} from './agents/index';
1616
export { Alpha } from './alpha';
17+
export {
18+
Benchmarks,
19+
type Benchmark,
20+
type ListBenchmarksResponse,
21+
type BenchmarkListResponse,
22+
type BenchmarkRegisterParams,
23+
} from './benchmarks';
1724
export {
1825
Eval,
1926
type BenchmarkConfig,

src/resources/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22

33
export * from './shared';
44
export { Alpha } from './alpha/alpha';
5-
export {
6-
Benchmarks,
7-
type Benchmark,
8-
type ListBenchmarksResponse,
9-
type BenchmarkListResponse,
10-
type BenchmarkRegisterParams,
11-
} from './benchmarks';
125
export { Beta } from './beta/beta';
136
export { Chat, type ChatCompletionChunk } from './chat/chat';
147
export {

tests/api-resources/benchmarks.test.ts renamed to tests/api-resources/alpha/benchmarks.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const client = new LlamaStackClient({ baseURL: process.env['TEST_API_BASE_URL']
77

88
describe('resource benchmarks', () => {
99
test('retrieve', async () => {
10-
const responsePromise = client.benchmarks.retrieve('benchmark_id');
10+
const responsePromise = client.alpha.benchmarks.retrieve('benchmark_id');
1111
const rawResponse = await responsePromise.asResponse();
1212
expect(rawResponse).toBeInstanceOf(Response);
1313
const response = await responsePromise;
@@ -20,12 +20,12 @@ describe('resource benchmarks', () => {
2020
test('retrieve: request options instead of params are passed correctly', async () => {
2121
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
2222
await expect(
23-
client.benchmarks.retrieve('benchmark_id', { path: '/_stainless_unknown_path' }),
23+
client.alpha.benchmarks.retrieve('benchmark_id', { path: '/_stainless_unknown_path' }),
2424
).rejects.toThrow(LlamaStackClient.NotFoundError);
2525
});
2626

2727
test('list', async () => {
28-
const responsePromise = client.benchmarks.list();
28+
const responsePromise = client.alpha.benchmarks.list();
2929
const rawResponse = await responsePromise.asResponse();
3030
expect(rawResponse).toBeInstanceOf(Response);
3131
const response = await responsePromise;
@@ -37,13 +37,13 @@ describe('resource benchmarks', () => {
3737

3838
test('list: request options instead of params are passed correctly', async () => {
3939
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
40-
await expect(client.benchmarks.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
40+
await expect(client.alpha.benchmarks.list({ path: '/_stainless_unknown_path' })).rejects.toThrow(
4141
LlamaStackClient.NotFoundError,
4242
);
4343
});
4444

4545
test('register: only required params', async () => {
46-
const responsePromise = client.benchmarks.register({
46+
const responsePromise = client.alpha.benchmarks.register({
4747
benchmark_id: 'benchmark_id',
4848
dataset_id: 'dataset_id',
4949
scoring_functions: ['string'],
@@ -58,7 +58,7 @@ describe('resource benchmarks', () => {
5858
});
5959

6060
test('register: required and optional params', async () => {
61-
const response = await client.benchmarks.register({
61+
const response = await client.alpha.benchmarks.register({
6262
benchmark_id: 'benchmark_id',
6363
dataset_id: 'dataset_id',
6464
scoring_functions: ['string'],

0 commit comments

Comments
 (0)