
The most helpful resource here is the LangChain KapaAI.
You can ask your questions to an AI assistant that is trained on AI!
This step is crucial so that we'll have API keys in the NodeJS runtime environment.
Set api keys in the terminal for LangChain web apps, using export on macOS and set on Windows. Understand command shells and PowerShell nuances for env variables in the quickstart.
Discover how to access course resources, join the Discord community, and use the Notion course textbook for LangChain docs, FAQs, and troubleshooting, with instructor support for stuck issues.
Master LangChain's quick start by exploring prompt templates, chains, tools, and memory, and learn to build AI web apps with OpenAI models and agents.
Troubleshoot npm install and npm run dev issues across Windows and Mac by installing Windows build tools, restarting VS code, and clearing node_modules and package.json before reinstalling.
Discover a beginner-friendly Next.js and tailwind crash course with React, presented at a slower pace for newcomers, and prepared for use in future projects.
Explore Next.js, React, and Tailwind to build fast web apps with reusable components, JSX rendering and data fetching, and inline Tailwind utilities for streamlined front end development.
Learn to build a Next.js app with React components and Tailwind CSS, manage state with useState, handle input changes, and connect to a back end via API routes with fetch.
Initialize the chat bot with your name and favorite food to demonstrate memory in LangChain. The demo shows the chain remembers your name and that sushi is your favorite food.
Discover how buffer memory preserves chat history by extending the base chat memory class from LangChain and using the conversation chain to build your first chat bot.
NOTE: To skip this section, simply copy the app/memory/page-finished.jsx
Set up a chat bot UI and backend memory with a post-based API, using LangChain and OpenAI to remember prior messages and render user and bot prompts.
Instantiate a conversation chain on the first message using OpenAI, with buffer memory, and bind prompt output to the frontend. Test and return the chain's response via the UI button.
Configure keys in next config.js and log memory responses from front-end and back-end; use GPT-3.5 Turbo to improve reasoning and persist memory like the user name Sean.
Conclude by summarizing how Lang Chain uses three lines of code with the OpenAI API and GPT-3.5 to power memory in a Next.js UI, plus reusable backend templates for future modules.
LangChain provides a streaming API that allows you to get words streamed back to you as they are generated. This is useful for chatbots, where you want to show the user what is being generated as it is being generated. You can find an example of how to use the streaming API in the LangChain documentation.
Set up the frontend by configuring env keys and the streaming API, manage state, sanitize tokens, and establish an event-source connection to receive live backend tokens.
Enable real-time streaming from the back end by using server-side events and a streaming route to push OpenAI tokens from the LangChain backend to the front end.
Celebrate completing the module and recall key concepts like prompt templates, streaming, and memory within the long chain framework. Head to the next module to continue learning about long chain.
⚠️ WARNING/DISCLAIMER ⚠️
This lecture was created in July 2023 prior to major changes to the LangChain-JS repository.
There may be bugs!
For an updated repository using the latest LangChain packages from June 2024, please skip to Section 9: PDF Chatbot V2.
Need Help?
To get the latest course updates, join the Discord and post on the #troubleshooting channel.
https://discord.gg/DPydvGb7
Initialize a pinecone vector database to enable high-performance vector search. Create an index with 1536 dimensions on an S1 pod, then configure API keys and env files for the backend.
Initialize pinecone instance and start the server, then use the pdf loader to upload and split the PDF, create a loader with the book path, and call load for docs.
Upload PDFs via a pdf loader, split documents into 250-word chunks with 10 overlap using a character text splitter, then reduce metadata by removing pdf fields for Pinecone search.
The VectorDBQAChain is a tool that allows you to interact with a vector store in an agentic manner. It is created by combining an LLM with a vector store, and can be used to answer questions about the data in the vector store. To use the VectorDBQAChain, you first need to create a vector store with your data, and then create the chain using the OpenAI LLM and the vector store. Once you have the chain, you can create a tool to use it, and then use the tool just like any other tool.
Build a pdf question-and-answer bot by loading a pdf into a pinecone vector store, chunking text, reducing metadata, and querying with an openai vector chain that returns source documents.
Leave a review for the LangChain and JavaScript Udemy course to improve the AI web-app learning experience, as the instructor reads every review and uses feedback to enhance the course.
Explore namespaces in Pinecone to partition a vector database, enabling uploading content to a specific namespace and querying only that subset, such as data engineers.
Add a front-end select to choose a book by ID, routing uploads to the corresponding Pinecone namespace. Initialize to 101 and send the ID in the query string for submits.
Upload differentiates books using query string params to identify the book id, maps the book path to book db, and sets the client namespace to that id as a string.
Learn to use namespaces in a vector store for querying, differentiating book IDs by a string namespace, and validating numeric IDs during testing.
Build a YouTube chat bot that fetches a video's transcript via YouTube API, embeds it with OpenAI, stores it in NSW Lib vector store, and answers queries through a chain.
ChatOpenAI is a chat model provided by LangChain. It allows you to get chat completions by passing one or more messages to the chat model. The response will also be a message. The types of messages currently supported in LangChain are AIChatMessage, HumanChatMessage, SystemChatMessage, and a generic ChatMessage. Most of the time, you'll just be dealing with HumanChatMessage, AIChatMessage, and SystemChatMessage. You can also use the streaming API to get words streamed back to you as they are generated. This is useful for chatbots, where you want to show the user what is being generated as it is being generated.
HNSWLib is an in-memory vector store that can be saved to a file and is only available on Node.js. It is used for similarity search and uses HNSWLib. You can create a new index from texts or a loader, save an index to a file and load it again, and filter documents.
Master handling follow-up questions in a LangChain AI web-app using JavaScript by managing the first message flag, updating chat history, and querying the conversational retrieval chain.
Build a Next.js and JavaScript chat bot that chats with YouTube videos by passing transcripts into a LangChain chain, persisting history with a vector store and OpenAI chat models.
Use YouTube transcript and data APIs, Serp API, and a browser tool to gather video context. Initialize a LangChain agent to generate scripts and tweets from the transcript and research.
Develop and test a front-end content generator that passes prompts and topics, extract YouTube video IDs, fetch transcripts, and wire a back-end chat chain to OpenAI for AI web-app content.
Fetches YouTube video metadata using the YouTube data API and a Google API key, extracting the video title, shortened description, and video ID via an Axios request.
Create a research agent in LangChain using the Serp API tool to perform web browsing on a topic, such as Pedro Pascal, and fetch up to date results.
The Web Browser Tool allows an agent to visit a website and extract information. It has two modes of operation:
When called with only a URL, it produces a summary of the website contents.
When called with a URL and a description of what to find, it uses an in-memory Vector Store to find the most relevant snippets and summarize those.
To use the Web Browser Tool, you need to install the dependencies cheerio and axios. The tool can be used standalone or in an agent.
The "zero-shot-react-description" agent is a type of agent that can be used with text LLMs. It is a stateless wrapper around an agent prompt chain, such as MRKL, that formats tools into the prompt and parses responses obtained from the chat model. This agent is recommended for use with small tasks.
Configure an agent with tools and a chain using a chat OpenAI model (GPT-3.5 Turbo) and a topic-driven init chain. Pass transcript, metadata, and topic to generate research-based YouTube scripts.
Design LLM chain prompts with system and human templates, referencing transcript, metadata, and research. Generate a lighthearted video commentary script using the prompt template and transcript.
Learn to generate follow up questions for a LangChain chat bot by triggering a new prompt, calling the chain with transcript and metadata, and updating the chat history.
Showcases a complete front-end content generator built with LangChain, leveraging YouTube transcripts and metadata, a zero-shot agent with Bing and browser tools, and prompt templates to generate content.
RoboHR demonstrates a personal assistant that summarizes resumes using document loaders, embeddings, and a summarization chain with Pinecone, then answers queries about Python skills and Meta experience with source notes.
Upload resumes to a Pinecone vector store with 1536 max dimensions for OpenAI embeddings, then use metadata-based queries and a vector store agent via backend API.
Convert resumes to embeddings by loading a directory of PDFs with Lang Chain directory loader into the vector database, then store embeddings in Pinecone using OpenAI keys.
Load PDFs with a directory loader, split into 200-word chunks using a character text splitter with 20 overlap, then reduce metadata to essential names for efficient querying and upcoming summarization.
The SummaryChain is a chain provided by LangChain that can be used to generate a summary of a given input text. To use it, you can import it from langchain/chains and create an instance of it. Once you have created the chain, you can call its call method with a text input to get a summary of the text.
Build a script that maps over documents, summarizes each with a MapReduce chain using an OpenAI model, then upload embeddings to Pinecone and update the vector store.
Explore Supabase as an open source firebase alternative for vector databases and OpenAI embeddings with PG vector, including creating a documents table with embeddings and vector search.
Swap Pinecone for Supabase vector store in the resume uploader, configure API keys and env vars, embed with OpenAI, and query metadata to verify the migrated setup.
Encourage learners to leave a course rating, share troubleshooting questions on Discord, and help improve updates to deployment and the new Supabase section for current and future students.
Upload resumes as embeddings to a Pinecone vector store, build a vector db chain with OpenAI embeddings, and return the top two relevant resumes plus their source documents.
Load the user prompt, initialize a Pinecone vector store for vector DB chain, apply the prompt template to input question, set K to two, and log results with source documents.
Learn how to deploy a full-stack Next.js app to Vercel, including pushing to Git, managing private repositories and env keys, and configuring environment variables for OpenAI calls.
Fix deployment issues by removing moved content generator solutions that caused an import error, then commit, push, and redeploy to resolve module errors.
Explore Pinecone as a pure vector database for embeddings and similarity searches. Set up a Pinecone index with ETA 002 embeddings and secure API keys in dot env and next.config.js.
Welcome to the LangChain AI JavaScript course!
As we stand here in 2023, AI is transforming our world at the speed of light. It's not just a buzzword - it's a reality shaping industries, from finance to healthcare, logistics, and entertainment. And you, as a developer, are in a prime position to ride the wave.
Dive into the innovative world of building Large Language Models (LLM) with LangChain, a groundbreaking tool for rapidly building AI powered applications.
In this course, we place an equal emphasis on theory and practice. We’ll start easy, and increase the complexity with each project. Additionally, you'll have starter templates for each project, so that you spend most of your time learning about AI, and less time worrying about setting up your code environment.
In 2023 alone, we’ve seen a rise in AI products making hundreds to thousands of dollars a month built by solo developers. At the end of the course, you will have built SIX stunning full-stack AI applications that will give you the skills to build your own AI products from scratch.
The world is moving fast, and AI is leading the charge. Don't be left behind, wishing you had started learning AI sooner. So secure your spot in the course, and take the first step towards your AI journey today.
In this course, we use cutting edge technologies to create a seamless developer experience:
LangChain, an AI framework for rapidly building LLM applications with OpenAI, HuggingFace, and more.
NextJS - Allows you to build the frontend and backend in one language, JavaScript.
Vercel - You'll know how to deploy your LLM application to users, without pulling your hair out.
TailwindCSS - Each project comes with a pre-styled template, so you don't need to worry about styling.
By the end of the course you will the skills to:
Chat With Anything - use AI to chat with books, videos, etc.
Supercharge Your Work - create autonomous AI agents that can "think" through complex tasks
Launch Your Product - display your AI projects for potential employers/customers to see
Troubleshoot Anything - how to use AI tools beyond ChatGPT to become the "10x developer"
Course Pre-Requisites:
Some experience in JavaScript (or a similar programming language) is helpful
Some experience in React is helpful
No experience in AI, NextJS, TailwindCSS necessary
A desire to build your own AI applications!
This is not just a course, it's a community. Along with lifetime access to the course, you'll get:
Dedicated 1 on 1 troubleshooting support with me
Notion Course Textbook with additional AI resources, FAQ, troubleshooting guides
Access to an exclusive Discord community to connect with other learners
No extra cost for continuous updates and improvements to the course