Get answers from different GPT models.
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
Setting Up Your API Key
In the root of your project:
.env
file.REACT_APP_OPENAI_API_KEY='your-api-key-here'
.To run the project in your local environment, follow these steps:
npm install
or yarn
in the project directory to install the required dependencies..env
file, inside write REACT_APP_OPENAI_API_KEY='your-api-key-here'
npm run start
or yarn start
to get the project started.