Class JinaEmbeddingFilter
java.lang.Object
org.apache.tika.metadata.filter.MetadataFilter
org.apache.tika.inference.AbstractEmbeddingFilter
org.apache.tika.inference.OpenAIEmbeddingFilter
org.apache.tika.inference.JinaEmbeddingFilter
- All Implemented Interfaces:
Closeable, Serializable, AutoCloseable
Extends
OpenAIEmbeddingFilter for
Jina AI v5 text embeddings.
The only difference from the standard OpenAI format is an optional
"task" field in the request body that instructs the Jina model
how to optimise the embedding. Supported values include
retrieval.passage (default, for indexing documents),
retrieval.query (for query-time embeddings),
text-matching, classification, and separation.
Configuration key: "jina-embedding-filter"
- Since:
- Apache Tika 4.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class OpenAIEmbeddingFilter
embed, getApiKeyHeaderName, getApiKeyPrefix, getEmbeddingsPath, setApiKeyHeaderName, setApiKeyPrefix, setEmbeddingsPathMethods inherited from class AbstractEmbeddingFilter
filter, getApiKey, getBaseUrl, getContentField, getDefaultConfig, getMaxBatchSize, getMaxChunkChars, getMaxChunks, getModel, getOutputField, getOverlapChars, getTimeoutSeconds, isClearContentAfterChunking, isSkipEmbedding, setApiKey, setBaseUrl, setClearContentAfterChunking, setContentField, setMaxBatchSize, setMaxChunkChars, setMaxChunks, setModel, setOutputField, setOverlapChars, setSkipEmbedding, setTimeoutSecondsMethods inherited from class MetadataFilter
close, filter
-
Constructor Details
-
JinaEmbeddingFilter
public JinaEmbeddingFilter() -
JinaEmbeddingFilter
-
-
Method Details
-
getTask
-
setTask
Set the Jina task type. Default isretrieval.passage. Useretrieval.querywhen embedding search queries.
-