Interface EmbeddingGenerationService<TValue>

  • Type Parameters:
    TValue - The type of the data to generate embeddings for
    All Superinterfaces:
    AIService
    All Known Subinterfaces:
    TextEmbeddingGenerationService

    public interface EmbeddingGenerationService<TValue>
    extends AIService
    Interface for text embedding generation services
    • Method Detail

      • generateEmbeddingsAsync

        reactor.core.publisher.Mono<List<Embedding>> generateEmbeddingsAsync​(List<TValue> data)
        Generates a list of embeddings associated to the data
        Parameters:
        data - List of texts to generate embeddings for
        Returns:
        List of embeddings of each data point
      • generateEmbeddingAsync

        reactor.core.publisher.Mono<Embedding> generateEmbeddingAsync​(TValue data)
        Generates an embedding associated to the data
        Parameters:
        data - Text to generate embedding for
        Returns:
        Embedding of the data