LLM YouTube Fragments Plugin
A plugin for Simon Willison's LLM tool that adds a youtube fragment loader to download and use YouTube video subtitles in your prompts.
Installation
-
Make sure you have the LLM tool installed:
pip install llm
-
Install this plugin:
llm install llm-fragments-youtube
This will automatically install all dependencies, including yt-dlp.
Usage
You can use the youtube or yt fragment in your LLM prompts to include subtitles from YouTube videos:
# Using a YouTube video ID
llm -f youtube:dQw4w9WgXcQ "summarize this video"
# You can also use the shorter 'yt' prefix
llm -f yt:dQw4w9WgXcQ "summarize this video"
# Continue chatting
llm -c "at which minute do they talk about ..."
# Language can also be specified
llm -f youtube:es:dQw4w9WgXcQ "resume el video"
# Using a full YouTube URL
llm -f youtube:https://www.youtube.com/watch?v=dQw4w9WgXcQ "summarize video"
Development
Running Tests
To run the tests, first install the package with test dependencies:
pip install -e ".[test]"
Then run the tests using pytest:
pytest
License
Beerware
Metadata
Release files for llm-fragments-youtube 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| llm_fragments_youtube-0.1.1.tar.gz | 6.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_fragments_youtube-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / llm_fragments_youtube-0.1.1.tar.gz
| Download URL | llm_fragments_youtube-0.1.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6c5ac041184b69bcb2d0a32aaad9eee62d61cb6a30a7f0263ccc5a1d5b673d6
|
|
BLAKE2b-256 checksum How to use checksums |
c98d491252516f31d8d1340b168b11b7166cdb5d23dc6abe7fec32c22eee5c43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 14, 2025.
Transparency logRelease files / llm_fragments_youtube-0.1.1-py3-none-any.whl
| Download URL | llm_fragments_youtube-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ad387f6087a7016a27679c258e882d00329295296b050914766e5767d0b0b0d5
|
|
BLAKE2b-256 checksum How to use checksums |
b76b24773f3ceeeb7cf74268c9475c6dd485beda95e574c14f9e4478a0820acd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 14, 2025.
Transparency log