To add all the videos from a youtube channel to your app, use the YoutubeChannelLoader.

Install Youtube addon

npm install @llm-tools/embedjs-loader-youtube

Usage

import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';
import { YoutubeChannelLoader } from '@llm-tools/embedjs-loader-youtube';

const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDb(new HNSWDb())
.build();

app.addLoader(new YoutubeChannelLoader({ youtubeChannelId: '...' }))