org.llm4s.llmconnect.EmbeddingClient
See theEmbeddingClient companion object
@Stable
class EmbeddingClient(provider: EmbeddingProvider, tracer: Option[Tracing], operation: String, val providerId: Option[ProviderId])(using service: ModelRegistryService)
Embeds text through an org.llm4s.llmconnect.provider.EmbeddingProvider. With a tracer, each call is traced: a completed call as one org.llm4s.trace.TraceEvent.EmbeddingUsageRecorded (with the call's provider and duration) and, when its model's pricing is known, a cost; a failed call as one org.llm4s.trace.TraceEvent.ErrorOccurred naming the embeddings operation (#2275).
Value parameters
- providerId
-
the canonical id of the provider, which tracing reports; EmbeddingClient.from sets it
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article