Skip to content

A language model chatbot developed by OpenAI based on GPT 3.5. Users can interact with bot, write, debug code and explain almot everything.

Notifications You must be signed in to change notification settings

ZJW-92/chatgpt_openai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vercel

A language model chatbot developed by OpenAI based on GPT 3.5. Users can interact with bot, require chatbot to write, debug code and explain almost everything.

Screenshot

Tech Stack

Server:

    1. Node.js: JavaScript runtime environment.
    1. Express: Node js web application framework.
    1. OpenAIApi: Performs a wide variety of natural language tasks, and Codex, which translates natural language to code.

Client:

    1. HTML
    1. CSS
    1. JavasSript
    1. Vite: Development environment for frameworks like Vue and React.

Setup

Run npm create vite@latest client --template vanilla and choose vanilla as framework.

Sign up account in OpenAI to get the secret OPENAI_API_KEY

server && client

  • 1. Run npm install && npm run server in one terminal
  • 2. Run npm install && npm run dev in another terminal

Deploy

    1. Render to host server side and add OPENAI_API_KEY in the environment variable
    1. Vercel to host the client side

Issues and solutions

    1. Error message 401: it means OPENAI_API_KEY in configruation is unauthorized

Solution: make sure put the OPENAI_API_KEY in .env inside of server folder rather than the root directory.

    1. Uncaught TypeError: fail to fetch at ....

Solution: change the localhost 5000 link in script.js to the new server link from render and push again

    1. Free trial usage is $18 and API key will expire on May 1, 2023

About

A language model chatbot developed by OpenAI based on GPT 3.5. Users can interact with bot, write, debug code and explain almot everything.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published