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

revert embeddings deprecation #115

Merged
merged 2 commits into from
Jul 19, 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 src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
*/
protected async processStreamableRequest<T extends object>(
endpoint: string,
request: { stream?: boolean } & Record<string, any>,

Check warning on line 69 in src/browser.ts

View workflow job for this annotation

GitHub Actions / test (16)

Unexpected any. Specify a different type

Check warning on line 69 in src/browser.ts

View workflow job for this annotation

GitHub Actions / test (18)

Unexpected any. Specify a different type

Check warning on line 69 in src/browser.ts

View workflow job for this annotation

GitHub Actions / test (20)

Unexpected any. Specify a different type
): Promise<T | AbortableAsyncIterator<T>> {
request.stream = request.stream ?? false
const host = `${this.config.host}/api/${endpoint}`
Expand Down Expand Up @@ -286,7 +286,6 @@

/**
* Embeds a text prompt into a vector.
* @deprecated Use the `embed` method instead.
* @param request {EmbeddingsRequest} - The request object.
* @returns {Promise<EmbeddingsResponse>} - The response object.
*/
Expand Down
6 changes: 0 additions & 6 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
function: {
name: string;
arguments: {
[key: string]: any;

Check warning on line 73 in src/interfaces.ts

View workflow job for this annotation

GitHub Actions / test (16)

Unexpected any. Specify a different type

Check warning on line 73 in src/interfaces.ts

View workflow job for this annotation

GitHub Actions / test (18)

Unexpected any. Specify a different type

Check warning on line 73 in src/interfaces.ts

View workflow job for this annotation

GitHub Actions / test (20)

Unexpected any. Specify a different type
};
};
}
Expand Down Expand Up @@ -150,9 +150,6 @@
options?: Partial<Options>
}

/**
* @deprecated Use the EmbedRequest interface with the embed() method instead.
*/
export interface EmbeddingsRequest {
model: string
prompt: string
Expand Down Expand Up @@ -197,9 +194,6 @@
embeddings: number[][]
}

/**
* @deprecated Use the embed() method with the EmbedResponse instead.
*/
export interface EmbeddingsResponse {
embedding: number[]
}
Expand Down Expand Up @@ -239,8 +233,8 @@
details: ModelDetails
messages: Message[]
modified_at: Date
model_info: Map<string, any>

Check warning on line 236 in src/interfaces.ts

View workflow job for this annotation

GitHub Actions / test (16)

Unexpected any. Specify a different type

Check warning on line 236 in src/interfaces.ts

View workflow job for this annotation

GitHub Actions / test (18)

Unexpected any. Specify a different type

Check warning on line 236 in src/interfaces.ts

View workflow job for this annotation

GitHub Actions / test (20)

Unexpected any. Specify a different type
projector_info?: Map<string, any>

Check warning on line 237 in src/interfaces.ts

View workflow job for this annotation

GitHub Actions / test (16)

Unexpected any. Specify a different type

Check warning on line 237 in src/interfaces.ts

View workflow job for this annotation

GitHub Actions / test (18)

Unexpected any. Specify a different type

Check warning on line 237 in src/interfaces.ts

View workflow job for this annotation

GitHub Actions / test (20)

Unexpected any. Specify a different type
}

export interface ListResponse {
Expand Down
Loading