Embedder

interface Embedder(source)

Interface for text embedding operations. Implementations of this interface can convert text into vector representations (embeddings) and calculate the difference between two embeddings.

Functions

Link copied to clipboard
abstract fun diff(embedding1: Vector, embedding2: Vector): Double

Calculates the difference between two embeddings. Lower values indicate more similar embeddings.

Link copied to clipboard
abstract suspend fun embed(text: String): Vector

Embeds the given text into a vector representation.