Skip to content

Commit

Permalink
chore: revert file to match develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
shakkernerd committed Dec 28, 2024
1 parent f65e8e4 commit 821b792
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/core/src/embedding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,15 @@ interface EmbeddingOptions {
provider?: string;
}

// Define the providers as a const object
export const EMBEDDING_PROVIDERS = {
export const EmbeddingProvider = {
OpenAI: "OpenAI",
Ollama: "Ollama",
GaiaNet: "GaiaNet",
BGE: "BGE",
} as const;

// Create type from the values
export type EmbeddingProvider = typeof EMBEDDING_PROVIDERS[keyof typeof EMBEDDING_PROVIDERS];

// If you need individual types, use type aliases instead of namespace
export type OpenAIProvider = typeof EMBEDDING_PROVIDERS.OpenAI;
export type OllamaProvider = typeof EMBEDDING_PROVIDERS.Ollama;
export type GaiaNetProvider = typeof EMBEDDING_PROVIDERS.GaiaNet;
export type BGEProvider = typeof EMBEDDING_PROVIDERS.BGE;
export type EmbeddingProviderType =
(typeof EmbeddingProvider)[keyof typeof EmbeddingProvider];

export type EmbeddingConfig = {
readonly dimensions: number;
Expand Down

0 comments on commit 821b792

Please sign in to comment.