JinaEmbeddingProvider
Embedding provider implementation for the Jina AI embedding API.
Generates text embeddings by posting batched input to Jina's <baseUrl>/embeddings endpoint (the default base URL is https://api.jina.ai/v1), with a JinaTask as the task field: the one the provider was built with if there is one, otherwise the one the request's org.llm4s.llmconnect.model.InputPurpose stands for (JinaTask.forPurpose). All texts go in one HTTP call.
Requires a valid Jina AI API key (JINA_API_KEY) in the provider configuration.
Jina supplies embeddings and no chat client, so it is an org.llm4s.llmconnect.spi.EmbeddingProviderDescriptor only, registered by Llm4sJinaModule.
Attributes
- See also
-
EmbeddingProvider for the common embedding interface
- Source
- JinaEmbeddingProvider.scala
- Graph
-
- Supertypes
- Self type
Members list
Value members
Concrete methods
Builds the provider for the SPI: the task follows each request's purpose; see fromConfig to fix the task.
Builds the provider for the SPI: the task follows each request's purpose; see fromConfig to fix the task.
Attributes
- Source
- JinaEmbeddingProvider.scala
Creates an EmbeddingProvider backed by Jina AI whose task follows each request's org.llm4s.llmconnect.model.InputPurpose.
Creates an EmbeddingProvider backed by Jina AI whose task follows each request's org.llm4s.llmconnect.model.InputPurpose.
Attributes
- Source
- JinaEmbeddingProvider.scala
Creates an EmbeddingProvider backed by Jina AI that sends task with every request, whatever the request's org.llm4s.llmconnect.model.InputPurpose. An explicit task wins over the purpose: it is a deliberate choice, and it can be one the purpose cannot express, such as JinaTask.TextMatching.
Creates an EmbeddingProvider backed by Jina AI that sends task with every request, whatever the request's org.llm4s.llmconnect.model.InputPurpose. An explicit task wins over the purpose: it is a deliberate choice, and it can be one the purpose cannot express, such as JinaTask.TextMatching.
Attributes
- Source
- JinaEmbeddingProvider.scala
Inherited methods
Alternative spellings accepted in EMBEDDING_MODEL=<name>/<model>, folded onto id.
Alternative spellings accepted in EMBEDDING_MODEL=<name>/<model>, folded onto id.
Attributes
- Inherited from:
- EmbeddingProviderDescriptor
- Source
- EmbeddingProviderDescriptor.scala
Turns this provider's config section into the EmbeddingProviderConfig its client needs.
Turns this provider's config section into the EmbeddingProviderConfig its client needs.
The default implementation resolves model, base URL and API key against configSpec, which is all any of the project's own providers needs. Override it only for a provider whose config genuinely cannot be expressed that way.
Value parameters
- modelOverride
-
the
<model>half ofEMBEDDING_MODEL=<id>/<model>, when the unified form was used. Takes precedence over the section. - section
-
the
llm4s.embeddings.<id>section, already parsed, itsapiKeyalready falling back to the sharedllm4s.credentials.<id>.apiKeywhen it sets none. Empty rather than absent when the user configured nothing. Everything this method needs arrives typed, in here: a descriptor never reads configuration itself.
Attributes
- Inherited from:
- EmbeddingProviderDescriptor
- Source
- EmbeddingProviderDescriptor.scala
The vector dimensions of model, when this provider knows them.
The vector dimensions of model, when this provider knows them.
Attributes
- Inherited from:
- EmbeddingProviderDescriptor
- Source
- EmbeddingProviderDescriptor.scala
Concrete fields
What this provider needs from llm4s.embeddings.<id>, and its defaults.
What this provider needs from llm4s.embeddings.<id>, and its defaults.
Attributes
- Source
- JinaEmbeddingProvider.scala
Canonical id, e.g. ProviderId("voyage"). Must be unique among the embedding providers in a registry.
Canonical id, e.g. ProviderId("voyage"). Must be unique among the embedding providers in a registry.
Chat and embedding ids live in separate namespaces, so a provider that supplies both — OpenAI, Ollama — uses the same id for each without a clash. That is what lets EMBEDDING_MODEL=ollama/nomic-embed-text and a named chat section with provider = "ollama" name the same provider.
Attributes
- Source
- JinaEmbeddingProvider.scala
Default output dimensions; the client does not send a dimensions parameter.
Default output dimensions; the client does not send a dimensions parameter.
Attributes
- Source
- JinaEmbeddingProvider.scala
