-
Notifications
You must be signed in to change notification settings - Fork 31.8k
/
Copy pathvscode.proposed.embeddings.d.ts
33 lines (23 loc) · 1.18 KB
/
vscode.proposed.embeddings.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'vscode' {
// https://github.com/microsoft/vscode/issues/212083
export interface Embedding {
readonly values: number[];
}
// TODO@API strictly not the right namespace...
export namespace lm {
export const embeddingModels: string[];
export const onDidChangeEmbeddingModels: Event<void>;
export function computeEmbeddings(embeddingsModel: string, input: string, token?: CancellationToken): Thenable<Embedding>;
export function computeEmbeddings(embeddingsModel: string, input: string[], token?: CancellationToken): Thenable<Embedding[]>;
}
export interface EmbeddingsProvider {
provideEmbeddings(input: string[], token: CancellationToken): ProviderResult<Embedding[]>;
}
export namespace lm {
export function registerEmbeddingsProvider(embeddingsModel: string, provider: EmbeddingsProvider): Disposable;
}
}