Implements a chat interface for querying OpenAI models. It allows users to interact with the AI in a conversational manner.
- Ability to choose AI model
- Chat with OpenAI models in a user-friendly interface.
- Session-based conversation history.
- Ability to clear the chat history.
To set up the chat interface, follow these steps:
- Clone the repository to your local machine.
- Add your openai api key to your env variables as follows:
export OPENAI_API_KEY="your openai api key"
- Install the required dependencies using
pip install -r requirements.txt
. - Install redis incase you don't have it using
brew install redis
- Start redis using
brew services start redis
- Run the Streamlit application with
streamlit run gpt.py
.
Once the application is running, you can start chatting by typing your message into the chat input box. If you wish to clear the chat, simply type 'clear' and press enter.
To see the chat UI in action, watch the demo:
gpt_n_chat_ui_demo.mp4
Contributions to this project are welcome. Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License - see the LICENSE file for details.