MockEmbeddingService

org.llm4s.agent.memory.MockEmbeddingService
See theMockEmbeddingService companion object
final class MockEmbeddingService(val dimensions: Int) extends EmbeddingService

A mock embedding service for testing.

Generates deterministic embeddings based on text content hash. Not suitable for production use.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def embed(text: String): Result[Array[Float]]

Generate an embedding for a single text.

Generate an embedding for a single text.

Value parameters

text

The text to embed

Attributes

Returns

Embedding vector or error

Definition Classes
override def embedBatch(texts: Seq[String]): Result[Seq[Array[Float]]]

Generate embeddings for multiple texts in a batch.

Generate embeddings for multiple texts in a batch.

Value parameters

texts

The texts to embed

Attributes

Returns

Embedding vectors (one per input) or error

Definition Classes

Concrete fields

override val dimensions: Int

Get the dimensionality of the embeddings produced.

Get the dimensionality of the embeddings produced.

Attributes