Access Jina AI embeddings via their API
Install this plugin in the same environment as LLM.
llm install llm-jina-api
The plugin adds an embedding model called jina-clip-v1-api
. You'll need to set an API key first:
llm keys set jina
# paste API key here
Follow the LLM documentation using jina-clip-v1-api
as the model name. For example:
llm embed -m jina-clip-v1-api -c 'pelican'
# To embed an image file:
llm embed --binary -m jina-clip-v1-api -i pelican.jpg
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-jina-api
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
llm install -e '.[test]'
To run the tests:
python -m pytest