A multilingual embedding API using jinaai/jina-embeddings-v3
3.4K
A FastAPI service that provides text embedding capabilities using the
jinaai/jina-embeddings-v3 model.
This API allows you to generate vector embeddings for text documents using the jinaai/jina-embeddings-v3 model. The
service supports different embedding tasks (query and indexing) and is designed to process batches of texts efficiently.
The service can be configured using the following environment variables:
PORT: The port to run the server on (default: 8000)VERSION: The version of the service (default: "unknown")BUILD_ID: The build identifier (default: "unknown")COMMIT_SHA: The commit SHA (default: "unknown")The recommended way to run this service is using Docker.
docker run -p 8000:8000 joanfabregat/jina-embed:latest
Documentation for the API can be found at /docs or /redoc when running the server.
/infoReturns information about the service.
{
"model_name": "jinaai/jina-embeddings-v3",
"version": "1.0.0",
"build_id": "12345",
"commit_sha": "abc123"
}
/embedGenerates embeddings for a list of texts.
Request body:
{
"texts": [
"This is a sample text",
"Another sample text"
],
"task": "query",
"batch_size": 4
}
Response:
[
[
0.123,
0.456,
...
],
[
0.789,
0.012,
...
]
]
Parameters:
texts: List of texts to embed (required)task: Embedding task, either "query" or "index" (default: "query")batch_size: Batch size for processing texts (default: 4)This project is licensed under the MIT License - see the license notice in the code for details.
Developed by Joan Fabrégat, [email protected]
Content type
Image
Digest
sha256:4bc5f5c84…
Size
1.1 GB
Last updated
over 1 year ago
docker pull joanfabregat/jina-embed