ai-nodejs

ai-nodejs

None

Stars: 74

Visit
 screenshot

This repository serves as a companion to the Build AI-Powered Apps with OpenAI and Node.js course on Frontend Masters. It includes course notes and provides alternative approaches for deprecated Langchain methods by installing the Langchain community module and importing loaders for document processing from PDFs and YouTube videos.

README:

Build AI-Powered Apps with OpenAI and Node.js

This repo is a companion to the Build AI-Powered Apps with OpenAI and Node.js course on Frontend Masters.

Frontend Masters

Materials

Errata

Document QA Query Function Lesson

A few of the Langchain methods used in this course have been deprecated. Here's an alternative approach:

Install the Langchain community module

npm i @langchain/community

Import the loaders

import { PDFLoader } from '@langchain/community/document_loaders/fs/pdf'
import { YoutubeLoader } from '@langchain/community/document_loaders/web/youtube'

Create the loaders using the community methods:

In docsFromYTVideo:

const loader = YoutubeLoader.createFromUrl(video, { language: 'en', addVideoInfo: true, })
return loader.load( new CharacterTextSplitter({ separator: ' ', chunkSize: 2500, chunkOverlap: 200, }) )

In docsFromPDF:

const docsFromPDF = async () => { const loader = new PDFLoader('./xbox.pdf')
return loader.load( new CharacterTextSplitter({ separator: ' ', chunkSize: 2500, chunkOverlap: 200, }) ) }

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for ai-nodejs

Similar Open Source Tools

For similar tasks

For similar jobs