Coder Social home page Coder Social logo

Add LangChain `YoutubeLoader` about lumos HOT 4 OPEN

andrewnguonly avatar andrewnguonly commented on September 27, 2024
Add LangChain `YoutubeLoader`

from lumos.

Comments (4)

Draculabo avatar Draculabo commented on September 27, 2024 1

I will finish it in a few days.

from lumos.

Draculabo avatar Draculabo commented on September 27, 2024 1

js.langchain.com/docs/integrations/document_loaders/web_loaders/youtube

https://github.com/langchain-ai/langchainjs/blob/d6e25af137873493d30bdf5732d46b842e421ffa/langchain/src/document_loaders/web/youtube.ts
I encountered some issues while developing YoutubeLoader.

  1. Recently, YouTube changed their API interface response fields, causing the original youtubei.js library to become ineffective. Specific problems can be viewed at the following link, which I have fixed according to the guidelines. However, for certain videos, they may not necessarily return subtitles.
    Github
    GitHub
  2. When sending fetch requests in Chrome extensions, it will automatically include the current origin and cannot be modified, which may result in our requests being intercepted. You can view the following links:
    javascript - Overridding XMLHttpRequest Prototype For Chrome Extension - Stack Overflow
    javascript - Chrome Extension: how to change origin in AJAX request header? - Stack Overflow
    Perhaps we can try not using YoutubeLoader and instead use a browser search engine API such as Serper API (Serper - The World's Fastest and Cheapest Google Search API)

from lumos.

andrewnguonly avatar andrewnguonly commented on September 27, 2024

Let's pause this feature for now. It looks like the issue from item 1 was also reported in LangChainJS's repo: langchain-ai/langchainjs#4994. Maybe we can push a fix to LangChainJS. It looks like several other people have implemented workarounds/solutions.

Regarding item 2, were you running the document loader from the background script or from the extension popup?

from lumos.

Draculabo avatar Draculabo commented on September 27, 2024

Let's pause this feature for now. It looks like the issue from item 1 was also reported in LangChainJS's repo: langchain-ai/langchainjs#4994. Maybe we can push a fix to LangChainJS. It looks like several other people have implemented workarounds/solutions.让我们暂时暂停此功能。看起来第 1 项中的问题也在 LangChainJS 的存储库中报告: langchain-ai/langchainjs#4994 .也许我们可以向LangChainJS推送修复程序。看起来其他几个人已经实施了变通方法/解决方案。

Regarding item 2, were you running the document loader from the background script or from the extension popup?关于第 2 项,您是从后台脚本还是从扩展弹出窗口运行文档加载器?

I run the document loader from the extension popup.

from lumos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.