EmbeddingGenerationService<TValue> Interface

Type Parameters

TValue

The type of the data to generate embeddings for

Implements

public interface EmbeddingGenerationService<TValue>
extends AIService

Interface for text embedding generation services

Method Summary

Modifier and Type Method and Description
abstract reactor.core.publisher.Mono<Embedding> generateEmbeddingAsync(TValue data)

Generates an embedding associated to the data

abstract reactor.core.publisher.Mono<java.util.List<Embedding>> generateEmbeddingsAsync(List<TValue> data)

Generates a list of embeddings associated to the data

Method Details

generateEmbeddingAsync

public abstract Mono generateEmbeddingAsync(TValue data)

Generates an embedding associated to the data

Parameters:

data - Text to generate embedding for

Returns:

Embedding of the data

generateEmbeddingsAsync

public abstract Mono> generateEmbeddingsAsync(List 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

Applies to