ChatGPT Chatbot Experiments with OpenAI's public API.
Install Node.js and create an OpenAI API key.
Create a file named .env in the root directory with the following contents:
OPENAI_API_KEY=YOURKEYValidate the API key and configuration using the CLI:
# install dependencies
npm install
# start the cli
npm run start| Action | Command | Description |
|---|---|---|
| start | npm run start |
CLI ChatGPT Chatbot Experiment |
| lint | npm run lint |
Run static code analysis |
| format | npm run format |
Format source files |
| Library | Reference |
|---|---|
| openai | https://github.com/openai/openai-node |
| dotenv | https://github.com/motdotla/dotenv |
| picocolors | https://github.com/alexeyraspopov/picocolors |
| readline-sync | https://github.com/anseki/readline-sync |
| Item | Reference |
|---|---|
| Node.js | https://nodejs.org |
| ESLint | https://eslint.org |
| Prettier | https://prettier.io |
| EditorConfig | https://editorconfig.org |
| Item | Reference |
|---|---|
| OpenAI | https://openai.com |
| OpenAI Node | https://github.com/openai/openai-node |
This project is released under the MIT License.
