EmbeddingsClient class final

Text embeddings from any OpenAI-compatible /embeddings endpoint (OpenAI, Ollama, Groq, DeepSeek, Together, LM Studio, vLLM).

Constructors

EmbeddingsClient({required String baseUrl, String? apiKey, Client? client, Map<String, String>? extraHeaders})

Properties

apiKey → String?
final
baseUrl → String
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

embed(List<String> inputs, {required String model, Map<String, Object?> extraBody = const {}}) → Future<List<List<double>>>
Embeds one or more texts, returning one vector per input (same order as inputs).
embedOne(String input, {required String model}) → Future<List<double>>
Convenience for a single input.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited