Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ladunjexa-pbl/vanillajs-luna-ai
LunaAI JavaScript AI ChatGPT app using OpenAI Machine Learning model ⚛
https://github.com/ladunjexa-pbl/vanillajs-luna-ai
chatgpt gpt-3 machine-learning openai vanillajs
Last synced: 3 months ago
JSON representation
LunaAI JavaScript AI ChatGPT app using OpenAI Machine Learning model ⚛
- Host: GitHub
- URL: https://github.com/ladunjexa-pbl/vanillajs-luna-ai
- Owner: ladunjexa-pbl
- License: mit
- Created: 2022-12-26T15:12:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-13T18:23:08.000Z (8 months ago)
- Last Synced: 2024-10-09T23:50:13.489Z (3 months ago)
- Topics: chatgpt, gpt-3, machine-learning, openai, vanillajs
- Language: JavaScript
- Homepage: https://vanillajs-luna-ai.vercel.app/
- Size: 6.33 MB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
![Project Banner](readme_assets/readme_banner.png#gh-dark-mode-only)
![Project Banner](readme_assets/readme_banner-light.png#gh-light-mode-only)
LunaAI Chat-GPT
LunaAI is your AI assistant, JavaScript ChatGPT AI app using OpenAI ML model.
View Demo
·
Documentation
·
Report Bug
·
Request Feature
# :notebook_with_decorative_cover: Table of Contents
- [About the Project](#star2-about-the-project)
* [Folder Structure](#bangbang-folder-structure)
* [Environment Variables](#key-environment-variables)
* [Tech Stack](#space_invader-tech-stack)
- [Getting Started](#toolbox-getting-started)
* [Installation](#gear-installation)
* [Run Locally](#running-run-locally)
- [Contributing](#wave-contributing)
- [License](#warning-license)
- [Contact](#handshake-contact)
- [Acknowledgements](#gem-acknowledgements)
## :star2: About the Project
LunaAI is a VanillaJS ChatGPT AI app that resembles the ChatGPT app with the ability to ask the AI for help.
### :bangbang: Folder Structure
The folder structure of LunaAI is separated into server-side and client-side.
```
lunaAI-ChatGPT/
|- client/
|-- assets/
|-- public/
|-- index.html
|-- package.json
|-- script.js
|-- style.css
|- server/
|-- package.json
|-- server.js
|-- .env
```Now, lets dive into the server and client folders.
#### client
`index.html` - `style.css` - `script.js`
Responsive layouts with CSS and elegant UI (User Interface) that resembles the ChatGPT app & communication with advanced GPT-3 model API.
#### server
`server.js` - `.env`
Node.js used for the server-side, VanillaJS code using OpenAI the newest Machine Learning model, handle events with JS.
### :key: Environment Variables
In order to use LunaAI you have to create your OpenAI api key [here](https://openai.com/api), to run this web app, you will need to add the following environment variable to your .env file
`OPENAI_API_KEY`
### :space_invader: Tech Stack
![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge&logo=node.js&logoColor=white)
![JavaScript](https://img.shields.io/badge/javascript-%23323330.svg?style=for-the-badge&logo=javascript&logoColor=%23F7DF1E)
![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge&logo=html5&logoColor=white)
![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge&logo=css3&logoColor=white)
![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge&logo=express&logoColor=%2361DAFB)## :toolbox: Getting Started
### :gear: Installation
#### Step 1:
Download or clone this repo by using the link below:```bash
https://github.com/ladunjexa/LunaAI-Chat-GPT
```#### Step 2:
LunaAI using NPM (Node Package Manager), therefore, make sure that Node.js is installed by execute the following command in console:
```bash
node -v
```#### Step 3:
Go to client & server folders and execute the following command in console to get the required dependencies:
```bash
npm install
```#### Step 4:
Within the server-side folder create a file named `.env` and add the following [environment variable](#key-environment-variables):
```bash
OPENAI_API_KEY=
```### :running: Run Locally
#### Step 1:
Go to server folder and execute the following command in console to get the required dependencies:
```bash
npm run server
```#### Step 2:
Go to client folder and execute the following command in console to get the required dependencies:
```bash
npm run dev
```## :wave: Contributing
Contributions are always welcome!
See [`contributing.md`](https://contributing.md/) for ways to get started.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request## :warning: License
Distributed under the MIT License. See [LICENSE.txt](https://github.com/ladunjexa/LunaAI-Chat-GPT/blob/main/LICENSE) for more information.
## :handshake: Contact
Liron Abutbul - [@lironabutbul6](https://twitter.com/lironabutbul6) - [@ladunjexa](https://t.me/ladunjexa)
Project Link: [https://github.com/ladunjexa/LunaAI-Chat-GPT](https://github.com/ladunjexa/LunaAI-Chat-GPT)
## :gem: Acknowledgements
This section used to mention useful resources and libraries that used in LunaAI ChatGPT
- [OpenAI API](https://openai.com/api)
- [Google Fonts](https://fonts.google.com/)
- #JSMastery