Skip to content

torbus/langchain-chat-nextjs

 
 

Repository files navigation

GPT-4 Chatbot UI

Build your own GPT-4 chatbot frontend with this open source Next.js template! Simply add OPENAI_API_KEY as a Secret in this Repl.

Don't have early access to GPT-4? Replace gpt-4 with gpt-3.5-turbo in pages/api/chat.js.

Note: due to insanely high traffic, I have downgraded this to GPT 3.5 until further notice.

Getting Started

Hit the run button to start the development server.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

API routes can be accessed on /api/chat. This endpoint can be edited in pages/api/chat.js.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Learn More

To learn more about Next.js, take a look at the following resources:

Productionizing your Next App

To make your next App run smoothly in production make sure to turn this Repl to an Always On Repl.

You can also produce a production build by running npm run build and changing the run command to npm run start.

About

Next.js frontend for LangChain Chat.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CSS 41.7%
  • JavaScript 35.1%
  • TypeScript 15.1%
  • HTML 7.2%
  • Nix 0.9%