A simple terminal-based chat using Groq AI for conversational interactions.
- Python 3.8+
- Groq API Key
pip install python-dotenv groq
If 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
.env
file in the project directory - Add your API key:
GROQ_API_KEY=your_api_key_here
- Modify
temperature
to adjust response creativity - Change
max_tokens
to 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
, orbye
to end the conversation
- Verify Python installation
- Check API key validity
- Ensure internet connectivity