HOWARD1021 / youtubeloader-error-langchainjs

Simple Nextjs app to carry out video transcription task of YouTube videos, with YoutubeLoader (document_loader) from Langchain JS library, taking the video url as input. The app has been used to discuss the debugging process and fix for the "TypeError: URL is not a constructor" error, encountered with the usage of YoutubeLoader.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: URL is not a constructor

Debug and Fix - YoutubeLoader error (🦜️🔗 Lanchain JS Library)

This is the repo of a simple Next.js app to transcribe YouTube videos with a given URL, using YoutubeLoader (document loader) from LangChain JS library . It has been created as part of a YouTube video that discusses the process of debugging and fixing the "TypeError: URL is not a constructor" error encountered while using the YoutubeLoader to carry out the video transcription task.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev

Open http://localhost:3000 with your browser to see the result.

Additional Notes

  • Google fonts: Roboto Mono, Montserrat, that are natively hosted on Nextjs server have been used to style the text content in the app.
  • ENUM data structure has been implemented in Javascript to model different api request states (initial, loading, finished). Corresponding code can be found in src/utils/converted-enum.js
  • Bars loader spinner from react-loader-spinner npm package has been used in the app to render UI that is representative of the loading state of video transcription/api request to the back-end.

About

Simple Nextjs app to carry out video transcription task of YouTube videos, with YoutubeLoader (document_loader) from Langchain JS library, taking the video url as input. The app has been used to discuss the debugging process and fix for the "TypeError: URL is not a constructor" error, encountered with the usage of YoutubeLoader.

License:MIT License


Languages

Language:JavaScript 68.5%Language:CSS 31.5%