Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

ai-nodejs

> 编程语言
Open source

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] cours…

99 stars0 likes4 views
WebsiteGitHub

About

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] cours…

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.

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

bash
npm i @langchain/community

Import the loaders

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

Create the loaders using the community methods:

In docsFromYTVideo:

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

In docsFromPDF:

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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言