DocumentEmbedder

Represents an interface for embedding documents into vector representations. Implementations of this interface should define how specific document types are processed and converted into embeddings for downstream applications.

Parameters

Document

The type of the document to be embedded.

Inheritors

Functions

Link copied to clipboard
abstract fun diff(embedding1: Vector, embedding2: Vector): Double
Link copied to clipboard
abstract suspend fun embed(text: String): Vector

abstract suspend fun embed(document: Document): Vector

Converts the provided document into its vector representation.