A simple terminal-based chat using Groq AI for conversational interactions.
- Python 3.8+
- Groq API Key
pip install python-dotenv groqIf using Termux, first install Rust:
pkg install rust
pkg install python
pip install python-dotenv groq- Create an account at Groq Console
- Generate your API key
- Create a
.envfile in the project directory - Add your API key:
GROQ_API_KEY=your_api_key_here
- Modify
temperatureto adjust response creativity - Change
max_tokensto control response length - Select different Groq AI models as needed
- Customize the system instructions as you like Change here
python chat_ai.py- Type your messages normally
- Type
exit,quit, orbyeto end the conversation
- Verify Python installation
- Check API key validity
- Ensure internet connectivity