Skip to content

Commit 821b792

Browse files
committed
chore: revert file to match develop branch
1 parent f65e8e4 commit 821b792

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

packages/core/src/embedding.ts

+3-10
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,15 @@ interface EmbeddingOptions {
1414
provider?: string;
1515
}
1616

17-
// Define the providers as a const object
18-
export const EMBEDDING_PROVIDERS = {
17+
export const EmbeddingProvider = {
1918
OpenAI: "OpenAI",
2019
Ollama: "Ollama",
2120
GaiaNet: "GaiaNet",
2221
BGE: "BGE",
2322
} as const;
2423

25-
// Create type from the values
26-
export type EmbeddingProvider = typeof EMBEDDING_PROVIDERS[keyof typeof EMBEDDING_PROVIDERS];
27-
28-
// If you need individual types, use type aliases instead of namespace
29-
export type OpenAIProvider = typeof EMBEDDING_PROVIDERS.OpenAI;
30-
export type OllamaProvider = typeof EMBEDDING_PROVIDERS.Ollama;
31-
export type GaiaNetProvider = typeof EMBEDDING_PROVIDERS.GaiaNet;
32-
export type BGEProvider = typeof EMBEDDING_PROVIDERS.BGE;
24+
export type EmbeddingProviderType =
25+
(typeof EmbeddingProvider)[keyof typeof EmbeddingProvider];
3326

3427
export type EmbeddingConfig = {
3528
readonly dimensions: number;

0 commit comments

Comments
 (0)