Skip to content

Commit e8a7cee

Browse files
authored
Sync updates from stainless branch: hardikjshah/dev (#25)
1 parent 1989335 commit e8a7cee

File tree

5 files changed

+20
-12
lines changed

5 files changed

+20
-12
lines changed

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import {
3232
Datasets,
3333
ListDatasetsResponse,
3434
} from './resources/datasets';
35-
import { EmbeddingCreateParams, Embeddings, EmbeddingsResponse } from './resources/embeddings';
35+
import { CreateEmbeddingsResponse, EmbeddingCreateParams, Embeddings } from './resources/embeddings';
3636
import {
3737
DeleteFileResponse,
3838
File,
@@ -45,7 +45,7 @@ import {
4545
import {
4646
ChatCompletionResponseStreamChunk,
4747
CompletionResponse,
48-
EmbeddingsResponse as InferenceAPIEmbeddingsResponse,
48+
EmbeddingsResponse,
4949
Inference,
5050
InferenceBatchChatCompletionParams,
5151
InferenceBatchChatCompletionResponse,
@@ -492,7 +492,7 @@ export declare namespace LlamaStackClient {
492492
Inference as Inference,
493493
type ChatCompletionResponseStreamChunk as ChatCompletionResponseStreamChunk,
494494
type CompletionResponse as CompletionResponse,
495-
type InferenceAPIEmbeddingsResponse as EmbeddingsResponse,
495+
type EmbeddingsResponse as EmbeddingsResponse,
496496
type TokenLogProbs as TokenLogProbs,
497497
type InferenceBatchChatCompletionResponse as InferenceBatchChatCompletionResponse,
498498
type InferenceBatchChatCompletionParams as InferenceBatchChatCompletionParams,
@@ -508,7 +508,7 @@ export declare namespace LlamaStackClient {
508508

509509
export {
510510
Embeddings as Embeddings,
511-
type EmbeddingsResponse as EmbeddingsResponse,
511+
type CreateEmbeddingsResponse as CreateEmbeddingsResponse,
512512
type EmbeddingCreateParams as EmbeddingCreateParams,
513513
};
514514

src/resource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type { LlamaStackClient } from './index';
44

5-
export class APIResource {
5+
export abstract class APIResource {
66
protected _client: LlamaStackClient;
77

88
constructor(client: LlamaStackClient) {

src/resources/datasets.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ export interface DatasetIterrowsResponse {
195195
* Whether there are more items available after this set
196196
*/
197197
has_more: boolean;
198+
199+
/**
200+
* The URL for accessing this list
201+
*/
202+
url?: string;
198203
}
199204

200205
export interface DatasetRegisterResponse {

src/resources/embeddings.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@ export class Embeddings extends APIResource {
88
* Generate OpenAI-compatible embeddings for the given input using the specified
99
* model.
1010
*/
11-
create(body: EmbeddingCreateParams, options?: Core.RequestOptions): Core.APIPromise<EmbeddingsResponse> {
11+
create(
12+
body: EmbeddingCreateParams,
13+
options?: Core.RequestOptions,
14+
): Core.APIPromise<CreateEmbeddingsResponse> {
1215
return this._client.post('/v1/openai/v1/embeddings', { body, ...options });
1316
}
1417
}
1518

1619
/**
1720
* Response from an OpenAI-compatible embeddings request.
1821
*/
19-
export interface EmbeddingsResponse {
22+
export interface CreateEmbeddingsResponse {
2023
/**
2124
* List of embedding data objects
2225
*/
23-
data: Array<EmbeddingsResponse.Data>;
26+
data: Array<CreateEmbeddingsResponse.Data>;
2427

2528
/**
2629
* The model that was used to generate the embeddings
@@ -35,10 +38,10 @@ export interface EmbeddingsResponse {
3538
/**
3639
* Usage information
3740
*/
38-
usage: EmbeddingsResponse.Usage;
41+
usage: CreateEmbeddingsResponse.Usage;
3942
}
4043

41-
export namespace EmbeddingsResponse {
44+
export namespace CreateEmbeddingsResponse {
4245
/**
4346
* A single embedding data object from an OpenAI-compatible embeddings response.
4447
*/
@@ -110,7 +113,7 @@ export interface EmbeddingCreateParams {
110113

111114
export declare namespace Embeddings {
112115
export {
113-
type EmbeddingsResponse as EmbeddingsResponse,
116+
type CreateEmbeddingsResponse as CreateEmbeddingsResponse,
114117
type EmbeddingCreateParams as EmbeddingCreateParams,
115118
};
116119
}

src/resources/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export {
3636
type DatasetIterrowsParams,
3737
type DatasetRegisterParams,
3838
} from './datasets';
39-
export { Embeddings, type EmbeddingsResponse, type EmbeddingCreateParams } from './embeddings';
39+
export { Embeddings, type CreateEmbeddingsResponse, type EmbeddingCreateParams } from './embeddings';
4040
export {
4141
Eval,
4242
type BenchmarkConfig,

0 commit comments

Comments
 (0)