JinaEmbedder
class is used to embed text data into vectors using the Jina AI API. Jina provides high-quality embeddings with support for different embedding types and late chunking for improved processing of long documents. Get your API key from here.
JINA_API_KEY
environment variable.
Parameter | Type | Default | Description |
---|---|---|---|
id | str | "jina-embeddings-v3" | The model ID used for generating embeddings. |
dimensions | int | 1024 | The dimensionality of the embeddings generated by the model. |
embedding_type | Literal['float', 'base64', 'int8'] | "float" | The format in which the embeddings are encoded. Options are “float”, “base64”, or “int8”. |
late_chunking | bool | False | Whether to use late chunking for improved processing of long documents. |
user | Optional[str] | - | The user associated with the API request. |
api_key | Optional[str] | - | The API key used for authenticating requests. |
base_url | str | "https://api.jina.ai/v1/embeddings" | The base URL for the API endpoint. |
headers | Optional[Dict[str, str]] | - | Additional headers to include in the API request. |
request_params | Optional[Dict[str, Any]] | - | Additional parameters to include in the API request. |
timeout | Optional[float] | - | Request timeout in seconds. |