Get answers from different GPT models.
-Developed it for multi model comparison(basically free Open source LLms) -Also added voice to text typing , just using WebSpeech API
In the web application you can compare models: gpt-3.5-turbo
and gpt-4-1106-preview
.
React
React Markdown
OpenAI API
SASS
Users input data that is asynchronously sent to the selected GPT model via the OpenAI API, using a streaming to output the generated text - the model's response, and ReactMarkdown to display the output, providing a full-fledged representation of the message.
To interact with the GPT models, an API key from OpenAI is required. This key enables your application to authenticate requests to OpenAI's services, ensuring that usage is secure and measured.
Acquiring an API Key
- Create an account at OpenAI.
- Navigate to the API section and generate a new API key.
- Once you have your key, you will use it in your environment file to authenticate API requests from your application.
Setting Up Your API Key
In the root of your project:
- Create a
.env
file. - Add the following line:
REACT_APP_OPENAI_API_KEY='your-api-key-here'
. - This will allow your application to authenticate its requests to OpenAI.
- Add a personal account (username, password, API key);
- Save user info, sessions in DataBase (MongoDB or Postgres);
- Add the ability to select models for comparison (drop-down list);
- Adapt the web application for mobile devices;
- The web application is not adapted for phones and tablets.
To run the project in your local environment, follow these steps:
- Clone the repository to your local machine.
- Run
npm install
oryarn
in the project directory to install the required dependencies. - Create
.env
file, inside writeREACT_APP_OPENAI_API_KEY='your-api-key-here'
- Run
npm run start
oryarn start
to get the project started. - Open http://localhost:3000 (or the address shown in your console) in your web browser to view the app.