Skip to content

feat: add plugin interface for custom embedding providers #96

@RobertLD

Description

@RobertLD

Only three hardcoded providers are supported. Users should be able to register custom embedding providers.

Suggested implementation:

interface EmbeddingProviderPlugin {
  name: string;
  embed(text: string): Promise<number[]>;
  embedBatch(texts: string[]): Promise<number[][]>;
  dimensions: number;
}

registerProvider(name: string, factory: () => EmbeddingProviderPlugin): void;

This would allow Cohere, Anthropic, Azure OpenAI, Hugging Face, and other services.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions