Skip to main content

LLM plugin for loading text from PDF files (local or URL)

Project description

llm-plugin-pdf

PyPI Changelog Tests License

LLM plugin for loading text from PDF files (local or URL) using PyMuPDF.

Installation

Install this plugin in the same environment as LLM.

llm install llm-plugin-pdf

This plugin requires the PyMuPDF and requests packages.

Usage

This plugin adds support for the pdf: fragment prefix. You can use it to load the full text content of a PDF from a local file path or a web URL.

# Load from a local file
llm fragment pdf:/path/to/your/document.pdf

# Load from a URL
llm fragment pdf:https://example.com/some-document.pdf

You can pipe the output to LLM commands:

llm fragment pdf:https://arxiv.org/pdf/2310.06825.pdf | llm -s "Summarize this PDF"

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-pdf
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

# Install in editable mode with test dependencies
python -m pip install -e '.[test]'

To run the tests:

pytest

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

llm_plugin_pdf-0.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

llm_plugin_pdf-0.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file llm_plugin_pdf-0.1.tar.gz.

File metadata

  • Download URL: llm_plugin_pdf-0.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_plugin_pdf-0.1.tar.gz
Algorithm Hash digest
SHA256 3cbfad64173988b4ff80052458710da18fd3010ea6eb63ab2ff4d395bb06019b
MD5 e65713cbfb3f9c4d93bb54f26570b61b
BLAKE2b-256 4e2b9e4ab82e60fb13ad522d8583e275fa648a11253b110ebfc59b96b5fa1bc4

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_plugin_pdf-0.1.tar.gz:

Publisher: publish.yml on agustif/llm-pdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_plugin_pdf-0.1-py3-none-any.whl.

File metadata

  • Download URL: llm_plugin_pdf-0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_plugin_pdf-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2766a4b86c1e2638a463f1882d029e8d6cf13fd15bcde1b7ec9ec2a93cdba928
MD5 a6263fb2b54a68f69fb1f120e4562456
BLAKE2b-256 65c9685a3256f4eb489bf38c69bb6c33ea8cf75555449a94d4c7719d529b0294

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_plugin_pdf-0.1-py3-none-any.whl:

Publisher: publish.yml on agustif/llm-pdf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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