Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #37

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Types:

- <code><a href="./src/resources/embeddings.ts">CreateEmbeddingResponse</a></code>
- <code><a href="./src/resources/embeddings.ts">Embedding</a></code>
- <code><a href="./src/resources/embeddings.ts">Usage</a></code>

Methods:

Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ export namespace Groq {
export import Embeddings = API.Embeddings;
export import CreateEmbeddingResponse = API.CreateEmbeddingResponse;
export import Embedding = API.Embedding;
export import Usage = API.Usage;
export import EmbeddingCreateParams = API.EmbeddingCreateParams;

export import Chat = API.Chat;
Expand Down
40 changes: 0 additions & 40 deletions src/resources/embeddings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,45 +76,6 @@ export interface Embedding {
object: 'embedding';
}

export interface Usage {
/**
* The list of embeddings generated by the model.
*/
data: Array<Embedding>;

/**
* The name of the model used to generate the embedding.
*/
model: string;

/**
* The object type, which is always "list".
*/
object: 'list';

/**
* The usage information for the request.
*/
usage: Usage.Usage;
}

export namespace Usage {
/**
* The usage information for the request.
*/
export interface Usage {
/**
* The number of tokens used by the prompt.
*/
prompt_tokens: number;

/**
* The total number of tokens used by the request.
*/
total_tokens: number;
}
}

export interface EmbeddingCreateParams {
/**
* Input text to embed, encoded as a string or array of tokens. To embed multiple
Expand Down Expand Up @@ -149,6 +110,5 @@ export interface EmbeddingCreateParams {
export namespace Embeddings {
export import CreateEmbeddingResponse = EmbeddingsAPI.CreateEmbeddingResponse;
export import Embedding = EmbeddingsAPI.Embedding;
export import Usage = EmbeddingsAPI.Usage;
export import EmbeddingCreateParams = EmbeddingsAPI.EmbeddingCreateParams;
}
2 changes: 1 addition & 1 deletion src/resources/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export { Chat } from './chat/chat';
export { CreateEmbeddingResponse, Embedding, Usage, EmbeddingCreateParams, Embeddings } from './embeddings';
export { CreateEmbeddingResponse, Embedding, EmbeddingCreateParams, Embeddings } from './embeddings';
export { Model, ModelList, Models } from './models';
export { Translation, Audio } from './audio/audio';