LLM plugin to access Google's Gemini family of models, with support for YouTube URLs
https://ai.google.dev/gemini-api/docs/video-understanding#youtube
Install this plugin in the same environment as LLM.
llm install llm-gemini-youtube
llm -m gemini-2.0-flash-yt -a 'https://www.youtube.com/watch?v=9hE5-98ZeCg' 'Can you summarize this video?'
llm -m gemini-1.5-pro-yt -a 'https://www.youtube.com/watch?v=9hE5-98ZeCg' 'What are the examples given at 01:05 and 01:19 supposed to show us?'
llm -m gemini-1.5-pro-yt -a 'https://www.youtube.com/watch?v=9hE5-98ZeCg' 'Transcribe the audio from this video, giving timestamps for salient events in the video. Also provide visual descriptions.'
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd llm-gemini-youtube
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
python -m pip install -e '.[test]'
To run the tests:
python -m pytest