@restnfeel/agentc-starter-kit
Version:
한국어 기업용 CMS 모듈 - Task Master AI와 함께 빠르게 웹사이트를 구현할 수 있는 재사용 가능한 컴포넌트 시스템
25 lines (22 loc) • 840 B
JavaScript
"use client";
import { OpenAIEmbeddingModel } from './openai.js';
class EmbeddingFactory {
static create(config) {
switch (config.type) {
case "openai":
if (!config.apiKey) {
throw new Error("OpenAI API key is required");
}
return new OpenAIEmbeddingModel(config.apiKey, config.modelName);
// TODO: Add other embedding model implementations
// case 'huggingface':
// return new HuggingFaceEmbeddingModel(config);
// case 'local':
// return new LocalEmbeddingModel(config);
default:
throw new Error(`Unsupported embedding model type: ${config.type}`);
}
}
}
export { EmbeddingFactory, OpenAIEmbeddingModel };
//# sourceMappingURL=index.js.map