Coder Social home page Coder Social logo

cybot.gpt's Introduction

GPT Chatbot: A chatbot built with the OpenAI API, Next.js and Tailwind CSS

This is the source code for the tutorial written by David Wu to build the GPT Chatbot project: Building a chatbot with OpenAI's ChatGPT API, Next.js and Tailwind CSS (https://davidwu.io/posts/building-a-chatbot-with-openais-chatgpt-api-nextjs-and-tailwind-css/).

The terminal commands below are for Mac and other Linux-based systems. Your mileage may vary if you are using Windows or another operating system.

This project uses the MIT License. See LICENSE.md for more information.

Live demo

You can try the version hosted on Vercel (the awesome cloud computing company founded by the creators of Next.js) here:

https://basic-gpt-chatbot.vercel.app/

Pre-requisites

This project requires Node.js 14.6.0 or higher.

For information on how to download, install and update Node.js, see their official website: https://nodejs.org/.

You can run the terminal commands node -v and npm -v to check what versions you have installed of Node.js and the associated package manager NPM.

How to launch the web app locally

  1. Change the present working directory to the gpt-chatbot folder. If you're using Visual Studio Code (https://code.visualstudio.com/), then create a new window and open the folder. Alternatively, you can use the cd terminal command to do this. You can run the command pwd to check you have done this correctly.

  2. Install the dependencies for the web app:

npm install
  1. Create a copy of the sample environment variables files, .env.sample, either manually or by running the following command:
cp .env.sample .env.local
  1. Add your OpenAI API key to the environment variables file .env.local and save the changes:
OPENAI_API_KEY=my-openai-api-key-1
  1. Run the local development server:
npm run dev
  1. Open your browser of choice and head to http://localhost:3000 to see the web app live locally.

  2. Make desired changes to the web app. Next.js will automatically update the web app when you save changes to the source code.

Acknowledgements and thanks

cybot.gpt's People

Contributors

john-amao avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.