Skip to main content

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

  1. Make sure you have the LLM tool installed:

    pip install llm
    
  2. 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

Download files

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

Source Distribution

llm_fragments_youtube-0.1.1.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

llm_fragments_youtube-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

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

Hashes for llm_fragments_youtube-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b6c5ac041184b69bcb2d0a32aaad9eee62d61cb6a30a7f0263ccc5a1d5b673d6
MD5 3fceea6f379159447820d5316649a7c7
BLAKE2b-256 c98d491252516f31d8d1340b168b11b7166cdb5d23dc6abe7fec32c22eee5c43

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_fragments_youtube-0.1.1.tar.gz:

Publisher: publish.yml on redraw/llm-fragments-youtube

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_fragments_youtube-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_fragments_youtube-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad387f6087a7016a27679c258e882d00329295296b050914766e5767d0b0b0d5
MD5 5c430ff861a7630800a4b4f1feade30c
BLAKE2b-256 b76b24773f3ceeeb7cf74268c9475c6dd485beda95e574c14f9e4478a0820acd

See more details on using hashes here.

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

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

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