Skip to main content

LLM plugin for Jina AI

Project description

llm-jina Plugin

LLM Plugin for Jina AI: Powerful AI-powered interactions across multiple domains.

Overview

The llm-jina plugin integrates Jina AI services with Simon Willison's llm CLI tool, providing a comprehensive set of AI-powered capabilities directly accessible from the command line.

Features

  • Web Search - Search the web with options for domain filtering
  • URL Content Reading - Extract and process content from URLs
  • Fact Checking - Verify the factual accuracy of statements
  • Text Embeddings - Generate vector embeddings for text analysis
  • Document Reranking - Reorder documents based on relevance to a query
  • Text Segmentation - Split text into manageable chunks
  • Classification - Categorize text or images into specified labels
  • Metaprompt Access - Access Jina's metaprompt system
  • Code Generation - Create code from natural language descriptions with safety checks

Installation

pip install llm-jina
# or
llm install llm-jina

Configuration

Set your Jina AI API key:

export JINA_API_KEY=your_api_key_here

You can get a Jina AI API key from jina.ai.

Usage Examples

Search

llm jina search "AI technology trends"
llm jina search "machine learning papers" --site arxiv.org
llm jina search "news today" --links --images

Read URL

llm jina read https://example.com/article
llm jina read https://blog.jina.ai --links
llm jina read https://docs.python.org/3/ --format markdown

Embed Text

llm jina embed "Your text here"
llm jina embed "Compare similarity using embeddings" --model jina-embeddings-v3

Rerank Documents

llm jina rerank "machine learning" "Document about NLP" "Paper on computer vision" "Article about ML"

Segment Text

llm jina segment "Long text to be split into chunks" --return-chunks

Classify

llm jina classify "I love this product!" --labels positive,negative,neutral
llm jina classify --image cat.jpg dog.jpg --labels cat,dog

Ground (Fact Checking)

llm jina ground "The Earth orbits the Sun" --sites nasa.gov,space.com

Metaprompt

llm jina metaprompt

Contributing

Contributions welcome! Please read the contributing guidelines.

Testing

Run the test suite:

pip install -e ".[dev]"
pytest

License

Apache 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_jina-0.2.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_jina-0.2.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file llm_jina-0.2.0.tar.gz.

File metadata

  • Download URL: llm_jina-0.2.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for llm_jina-0.2.0.tar.gz
Algorithm Hash digest
SHA256 71f94434db0db32b7ff5bb39416efd6405b55be786d001e4e5d1c7fb1f432831
MD5 398b0b771b6d7a56e48946bfc119ff98
BLAKE2b-256 14b8918f995de4536fbe86fddf627ae51917d2bbe7a450868d2a075443d14e53

See more details on using hashes here.

File details

Details for the file llm_jina-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: llm_jina-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for llm_jina-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50eed1cb208ea06ccd2a7f42dae7ed55da45f9b3964aa2e882d8151b8edea6a5
MD5 d91288707cc1ff33645bee950bc5e42a
BLAKE2b-256 87b26a29823ce925749bed2d8e9edd036cb164b9598a2fd55414bf3e57f1a237

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page