Skip to main content

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

  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 fragment in your LLM prompts to include subtitles from YouTube videos:

# Using a YouTube video ID
llm -f youtube: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


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.0.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.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file llm_fragments_youtube-0.1.0.tar.gz.

File metadata

  • Download URL: llm_fragments_youtube-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 3182c046243b9d0b20be72d245360cd00ac8a1cdca93275047c3dc7445387311
MD5 875e877aff49886e1d03dcfe91bd93b1
BLAKE2b-256 6ce63addc21d1eed623bfb338484e5278e4c56479aba3bb6b0014a94258af111

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_fragments_youtube-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_fragments_youtube-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 363ca4cfae6fca4889aa3fed0365d37a9c4dd97954266cf233b80a4502aed7b0
MD5 6eb49ec664d6908ae30ebfc333769a1b
BLAKE2b-256 2b2ce18f32db63792f1e8fa9e6401131311ca6339aab152e3431c2b795d3c7e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_fragments_youtube-0.1.0-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.

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