LLMEmbeddingProvider

Abstract base class for LLM embedding providers on Android.

Implements LLMEmbeddingProviderAPI. Platform-specific blocking wrappers are not available on this target; use the suspending embed methods from LLMEmbeddingProviderAPI directly.

Abstract base class for LLM embedding providers on Apple platforms.

Implements LLMEmbeddingProviderAPI. Platform-specific blocking wrappers are not available on this target; use the suspending embed methods from LLMEmbeddingProviderAPI directly.

Abstract base class for LLM embedding providers.

Implements LLMEmbeddingProviderAPI and, on JVM platforms, also exposes blocking Java-friendly wrapper methods (embedBlocking) so that Java callers can invoke embedding without dealing with Kotlin coroutines directly.

Abstract base class for LLM embedding providers on JavaScript.

Implements LLMEmbeddingProviderAPI. Platform-specific blocking wrappers are not available on this target; use the suspending embed methods from LLMEmbeddingProviderAPI directly.

JVM-specific abstract base class for LLM embedding providers.

Extends LLMEmbeddingProviderAPI with blocking Java-friendly wrapper methods so that Java callers can invoke embedding without dealing with Kotlin coroutines directly. The blocking wrappers run on an IO-bound dispatcher unless a custom ExecutorService is provided.

Inheritors

Abstract base class for LLM embedding providers on Wasm/JS.

Implements LLMEmbeddingProviderAPI. Platform-specific blocking wrappers are not available on this target; use the suspending embed methods from LLMEmbeddingProviderAPI directly.

Constructors

Link copied to clipboard
actual constructor()
actual constructor()
expect constructor()
actual constructor()
actual constructor()
actual constructor()

Functions

Link copied to clipboard
open suspend fun embed(text: String, model: LLModel): List<Double>

Embeds the given text using the given model into a vector of double-precision numbers.

open suspend fun embed(inputs: List<String>, model: LLModel): List<List<Double>>

Embeds the given input using the given model into a vector of double-precision numbers.

open suspend fun embed(text: String, model: LLModel): List<Double>

Embeds the given text using the given model into a vector of double-precision numbers.

open suspend fun embed(inputs: List<String>, model: LLModel): List<List<Double>>

Embeds the given input using the given model into a vector of double-precision numbers.

open suspend fun embed(text: String, model: LLModel): List<Double>

Embeds the given text using the given model into a vector of double-precision numbers.

open suspend fun embed(inputs: List<String>, model: LLModel): List<List<Double>>

Embeds the given input using the given model into a vector of double-precision numbers.

open suspend fun embed(text: String, model: LLModel): List<Double>

Embeds the given text using the given model into a vector of double-precision numbers.

open suspend fun embed(inputs: List<String>, model: LLModel): List<List<Double>>

Embeds the given input using the given model into a vector of double-precision numbers.

open suspend fun embed(text: String, model: LLModel): List<Double>

Embeds the given text using the given model into a vector of double-precision numbers.

open suspend fun embed(inputs: List<String>, model: LLModel): List<List<Double>>

Embeds the given input using the given model into a vector of double-precision numbers.

open suspend fun embed(text: String, model: LLModel): List<Double>

Embeds the given text using the given model into a vector of double-precision numbers.

open suspend fun embed(inputs: List<String>, model: LLModel): List<List<Double>>

Embeds the given input using the given model into a vector of double-precision numbers.

Link copied to clipboard
@JvmName(name = "embed")
fun embedBlocking(text: String, model: LLModel, executorService: ExecutorService? = null): List<Double>

Blocking Java-friendly wrapper around embed for single-text embedding.

@JvmName(name = "embed")
fun embedBlocking(inputs: List<String>, model: LLModel, executorService: ExecutorService? = null): List<List<Double>>

Blocking Java-friendly wrapper around embed for batch embedding.