import { CreateEmbeddingResponse } from 'openai/resources'; import { DyNTS_AI_Provider_ServiceBase } from './ai-provider.service-base'; import { DyFM_DAI_EmbeddingInfo } from '@futdevpro/fsm-dynamo/ai/document-ai'; /** * Abstract base class for embedding services * Defines the interface for AI providers that support embeddings */ export abstract class DyNTS_AI_Embedding_ServiceBase extends DyNTS_AI_Provider_ServiceBase { /** * Create an embedding for a single text * @param text - The text to embed * @param model - The embedding model to use * @param issuer - The issuer making the request * @returns Promise - The embedding vector */ abstract createEmbedding( set: { text: string; model: string; fullResponse?: boolean; issuer: string; } ): Promise; /** * Create embeddings for multiple texts * @param texts - Array of texts to embed * @param model - The embedding model to use * @param issuer - The issuer making the request * @returns Promise - Array of embedding vectors */ abstract createEmbeddings( set: { texts: string[]; model: string; fullResponse?: boolean; issuer: string; } ): Promise; /** * Get embedding information for a model * @param model - The model name * @returns DyFM_DAI_EmbeddingInfo - Information about the model */ abstract getEmbeddingInfo(model: string): DyFM_DAI_EmbeddingInfo; }