Learning Project for React and OpenAI API integration.
CosmoChat UI was developed for Radical AI as the second learing project. The main purpose of this project was to create a frontend for an OpenAI enabled chat bot in this case ScottishGPT
using React, and to create a Material UI styled activity chat of our iteraction with the ScottishGPT.
CosmoChat UI uses the following framework and technologies:
- React
- OpenAI GPT 3.5 Turbo API
- React Router
- Material UI
- ChatScope UI Library
- Node.js
Follow the steps to install and run this project
- Install node from (https://nodejs.org/en).
- Install and initialize the react app in your working directory by running the command
npx create-react-app .
. - Install React Router DOM using the command
npm install react-router-dom
. - Install Axios using the command
npm install axios
- Install Redux using
npm install redux react-redum
- Install Material UI bar chart
The code is organised into multiple folders in order to segregate the different aspects of development from one another.
All the APIs are present in the api
folder, all the static images and logos are in assests
, any HTML components that can be used multiple times in the UI is placed under component
, the different pages that are rendered to make up the functionalities of the application are under pages
, all the CSS files are in the styles
folder. Apart from these folders, App.jsx
is the root element of the application and index.js
is the entry point for application.