LLM plugin for loading YouTube subtitles as fragments
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_fragments_youtube-0.1.1.tar.gz.
File metadata
- Download URL: llm_fragments_youtube-0.1.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6c5ac041184b69bcb2d0a32aaad9eee62d61cb6a30a7f0263ccc5a1d5b673d6
|
|
| MD5 |
3fceea6f379159447820d5316649a7c7
|
|
| BLAKE2b-256 |
c98d491252516f31d8d1340b168b11b7166cdb5d23dc6abe7fec32c22eee5c43
|
Provenance
The following attestation bundles were made for llm_fragments_youtube-0.1.1.tar.gz:
Publisher:
publish.yml on redraw/llm-fragments-youtube
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_fragments_youtube-0.1.1.tar.gz -
Subject digest:
b6c5ac041184b69bcb2d0a32aaad9eee62d61cb6a30a7f0263ccc5a1d5b673d6 - Sigstore transparency entry: 238339511
- Sigstore integration time:
-
Permalink:
redraw/llm-fragments-youtube@a9487e70fdbd6fd40971f37e33408d30d844e0d7 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/redraw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9487e70fdbd6fd40971f37e33408d30d844e0d7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file llm_fragments_youtube-0.1.1-py3-none-any.whl.
File metadata
- Download URL: llm_fragments_youtube-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad387f6087a7016a27679c258e882d00329295296b050914766e5767d0b0b0d5
|
|
| MD5 |
5c430ff861a7630800a4b4f1feade30c
|
|
| BLAKE2b-256 |
b76b24773f3ceeeb7cf74268c9475c6dd485beda95e574c14f9e4478a0820acd
|
Provenance
The following attestation bundles were made for llm_fragments_youtube-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on redraw/llm-fragments-youtube
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llm_fragments_youtube-0.1.1-py3-none-any.whl -
Subject digest:
ad387f6087a7016a27679c258e882d00329295296b050914766e5767d0b0b0d5 - Sigstore transparency entry: 238339518
- Sigstore integration time:
-
Permalink:
redraw/llm-fragments-youtube@a9487e70fdbd6fd40971f37e33408d30d844e0d7 -
Branch / Tag:
refs/tags/0.1.1 - Owner: https://github.com/redraw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a9487e70fdbd6fd40971f37e33408d30d844e0d7 -
Trigger Event:
release
-
Statement type: