| 3 | * This interface is implemented by both OpenAI and Ollama embedders. |
| 4 | */ |
| 5 | export interface IEmbedder { |
| 6 | /** |
| 7 | * Creates embeddings for the given texts. |
| 8 | * @param texts Array of text strings to create embeddings for |
| 9 | * @param model Optional model ID to use for embeddings |
| 10 | * @returns Promise resolving to an EmbeddingResponse |
| 11 | */ |
| 12 | createEmbeddings(texts: string[], model?: string): Promise<EmbeddingResponse> |
| 13 | |
| 14 | /** |
| 15 | * Validates the embedder configuration by testing connectivity and credentials. |
| 16 | * @returns Promise resolving to validation result with success status and optional error message |
| 17 | */ |
| 18 | validateConfiguration(): Promise<{ valid: boolean; error?: string }> |
| 19 | |
| 20 | get embedderInfo(): EmbedderInfo |
| 21 | } |
| 22 | |
| 23 | export interface EmbeddingResponse { |
| 24 | embeddings: number[][] |
no outgoing calls
no test coverage detected