hinthornw / langchain-nextjs-mods

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🦜️🔗 LangChain + Next.js Starter Template

This template scaffolds a simple LangChain.js + Next.js starter template. It has one endpoint, POST /api/chat, that streams back a model call to the frontend. It uses Vercel's ai SDK to pipe the stream back to the client as well as display the incoming messages.

Screenshot of the interface

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.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

Learn More

To learn more about what you can do with LangChain.js, check out the docs here:

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out the Next.js deployment documentation for more details.

About


Languages

Language:TypeScript 67.0%Language:JavaScript 17.5%Language:CSS 15.5%