File tree 1 file changed +3
-10
lines changed
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -14,22 +14,15 @@ interface EmbeddingOptions {
14
14
provider ?: string ;
15
15
}
16
16
17
- // Define the providers as a const object
18
- export const EMBEDDING_PROVIDERS = {
17
+ export const EmbeddingProvider = {
19
18
OpenAI : "OpenAI" ,
20
19
Ollama : "Ollama" ,
21
20
GaiaNet : "GaiaNet" ,
22
21
BGE : "BGE" ,
23
22
} as const ;
24
23
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 ] ;
33
26
34
27
export type EmbeddingConfig = {
35
28
readonly dimensions : number ;
You can’t perform that action at this time.
0 commit comments