This is a simple Flask app that uses OpenAI's GPT-3 API to create a chatbot that can generate responses to user input. The chatbot uses the Davinci engine and a temperature of 0.5 to generate responses.
- Clone this repository to your local machine.
- Install the required dependencies by running pip install -r requirements.txt.
- Set your OpenAI API key as an environment variable named OPENAI_API_KEY.
- Start the Flask server by running python app.py.
- Visit http://localhost:5000 in your web browser.
- Enter some text in the input box and click the "Send" button.
- The chatbot will generate a response based on the input and display it on the page.
You can configure the chatbot by editing the generate_response() function in app.py. For example, you can change the engine, temperature, or maximum number of tokens used by the API. See the OpenAI API documentation for more information.