This project is a web application that mimics the functionality of ChatGPT, allowing users to interact with an AI model in a chat format. Built using Streamlit, it provides a user-friendly interface for chatting with the AI.
- User can input messages and receive responses from the AI.
- Chat history is maintained across sessions.
- Supports multiple AI models (default is
gpt-4o-mini).
To run this application, please create a .env file with the following environment variable:
OPENAI_API_KEY=<your-openai-api-key>Go to OpenAI to get your API key.
Then create a virtual environment and install the dependencies:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtIf you don't want to use the backend and frontend seperately, you can start the standalone application by running the following command:
python simple_aio.pyFirst start the backend service:
uvicorn backend.main:app --reloadThen start the frontend:
streamlit run frontend/app.py- Open your web browser and navigate to the URL provided by Streamlit (usually
http://localhost:8501). - Type your message in the input box and hit enter.
- The AI's response will be displayed in the chat interface.
