ChatAI is an interactive AI chatbot powered by Google Gemini AI models. Built with Streamlit, this app allows users to chat with an AI model and receive intelligent responses in real time.
- Select from multiple AI models (Gemini 2.0 Flash, Pro, Gemma 3, etc.).
- Interactive chat interface with real-time responses.
- Maintains chat history for a seamless experience.
- Simple and user-friendly UI built with Streamlit.
- Secure API key management using Streamlit Secrets.
git clone https://github.com/lakpriyaguru/chatai.git
cd chataipython -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windowspip install -r requirements.txtStore your Google Gemini AI API Key securely in Streamlit secrets.
- Rename
secrets.toml.exampletosecrets.toml. - Obtain your API key from Google AI Studio.
- Add your API key to the
secrets.tomlfile:GOOGLE_GEMINI_KEY = "your_google_genai_api_key"
- If deploying on Streamlit Cloud, add the secret under App Settings > Secrets.
Start the Streamlit app by running:
streamlit run app.py- Open the web interface.
- Choose an AI model from the dropdown menu.
- Type a question in the chat input box and press Enter.
- Get responses from the AI in real-time!
📂 chatai/
├── 📂 .streamlit/
│ ├── secrets.toml # Stores API key securely
├── 📜 app.py # Main Streamlit application
├── 📜 requirements.txt # Essential dependencies
├── 📜 requirements_all.txt # Full dependency list
├── 📜 README.md # Project documentation
This project is open-source and available under the MIT License.
Have questions or feedback? I'd love to hear from you! Feel free to reach out via lakpriyaguru.me.
If you found this project helpful, consider giving it a ⭐ on GitHub! Follow me for more updates and new projects. Happy coding! 🚀