Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added YouTube Metadata Reader #12975

Merged
merged 7 commits into from May 2, 2024
Merged

Conversation

Troyusrex2
Copy link
Contributor

This new package retrieves metadata from Youtube videos. It also allows combining that metadata with the transcript of the video. When using large numbers of videos for RAG AI, the transcript of the video was not enough. Having metadata, in particular the tags, but also statistics such as hit count, date and comment count were extremely useful for quick and effective use with LLMs. These can also easily be combined with an LLM generated summary of the transcript which I chose not to include here but will include when I create my example using this tool.

It uses the youtube_transcript_api package and needs a google API key.

It does not use the existing llama-index-readers-youtube-transcript as using youtube_transcript_api directly was straightforward.

This is my first time updating any open source project. I tried hard to follow the guidelines, but if anything is not correct I am happy to fix it.

Did I fill in the tool.llamahub section in the pyproject.toml and provide a detailed README.md for my new integration or package?

  • [X ] Yes
  • No

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • [ X] No

Type of Change

Please delete options that are not relevant.

  • [ X] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

I have used this as part of a larger project to collect and label thousands of Youtube videos from various creators. I had another programmer and a Copilot look it over as well. I wrote a separate testing app to call it remotely to check that it worked properly.

  • [X ] Added new unit/integration tests
  • Added new notebook (that tests end-to-end)
  • [ X] I stared at the code and made sure it makes sense

Suggested Checklist:

  • [ X] I have performed a self-review of my own code
  • [ X] I have commented my code, particularly in hard-to-understand areas
  • [ X] I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • [ X] My changes generate no new warnings
  • [ X] I have added tests that prove my fix is effective or that my feature works
  • [ X] New and existing unit tests pass locally with my changes
  • [ X] I ran make format; make lint to appease the lint gods

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 20, 2024
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Apr 27, 2024
Copy link
Contributor

@nerdai nerdai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the contribution! left a couple comments to start

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 2, 2024
@logan-markewich logan-markewich enabled auto-merge (squash) May 2, 2024 03:22
@logan-markewich logan-markewich merged commit 0f8a6ef into run-llama:main May 2, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants