Skip to content

TensorCruncher/youtube-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Youtube Chat Bot 📽️ + 🤖 + 🗣️ + ✍️

This is a youtube chatbot chrome extension that allows users to chat with a youtube video.

You can ask for:

  • Summary of the video
  • If a topic is covered in the video
  • Explanations in easy words

Conditions

  • Video must have english subtitles (can be autogenerated)
  • 20 questions / hour since this is a simple project
  • If the bot can't answer based on youtube transcript, it says "I don't know."
  • If it feels you're asking a question unrelated to the video, it says "Please ask questions about the video only."
  • If you close the chat panel, the conversation will be lost. You must then refresh the page to get a new panel back.
  • First message can take some time to get a response since the transcript for the video is being fetched and embdedded.
  • Some times APIs and processes can randomly cause absurdly long times for reply (~ 1 minute). Just message again (assuming it's not the first message, in which case it just needs about 5s to reply and then usually 1-2s per reply).

Drawbacks

The main issue is around detecting navigation changes in the YouTube single page application. The code I had for this worked locally with some exceptions. But after downloading the extension from the chrome webstore, the number of issues has increased. This includes the chat window not refreshing on navigating to a different video.

TBH, I was too exhausted to go back and change things at this point, especially since it would require submitting a new version to the wbestore.

As a temporary workaround, refresh the page for the chat window to appear / refresh.

Tech

Frontend:

  • Deployed to Chrome webstore (Pending)
  • HTML (injected via content.js file)
  • CSS
  • Javascript

Backend:

  • Hosted on Render
  • Python
  • FastAPI
  • LangChain
  • LangSmith
  • FAISS

Scope for improvement

  • Need to take measures to reduce latency
  • Youtube SPA behaviour needs to accounted for further, specifically playlist video change behaviour
  • Hit enter to send message and other quality of life improvements
  • Persistence of chats
  • User accounts

Attribution

Icon for chrome extension from: Chatbot icons created by Freepik - Flaticon

About

Chrome extension that allows users to chat with youtube videos with english subtitles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published