This AI-powered chatbot operates seamlessly on any computer setup, incorporating text-based interaction, document processing, and file management. Built on Groq's API, it leverages powerful language models for efficient and accurate natural language processing.
- Overview
- Features
- Run Locally
- Environment Variables
- Development Tools and Technologies
- Future Enhancements
- Contributing
- 💬 Text-based Interaction: Understands and responds to queries effectively
- 🧠 Context Awareness: Maintains conversation context for relevant responses
- 🔄 Multiple Language Models: Supports various LLM models for diverse use cases
- 🤖 Agent-based Architecture: Utilizes LangChain's React agent for advanced reasoning and tool use
- 📄 PDF Processing: Reads, analyzes, and answers questions based on PDF documents
- 📝 Text Extraction: Extracts text from uploaded documents for analysis
- 📁 Database Integration: Supports both local file storage and external database connections
-
Clone the project
git clone https://github.com/AugustinMORVAL/Chatbot_with_Groq.git
-
Install dependencies
pip install -r requirements.txt
-
Run the Chatbot
streamlit run chatbot.py
You can set up your environment variables using either a .env
file or Streamlit secrets:
Create a .env
file in the root directory to store your API keys:
API Key | Type | Description | Get API Key |
---|---|---|---|
GROQ_API_KEY |
string |
Required | Create Groq API Key |
If you're deploying your app on Streamlit Cloud, you can use Streamlit secrets to securely store your API keys:
- Create a file named
.streamlit/secrets.toml
in your project directory. - Add your API key to this file:
groq_api_key = "your-api-key-here"
- If deploying to Streamlit Cloud, add these secrets in the app settings.
The chatbot will automatically use the API key from Streamlit secrets if available, falling back to prompting the user for input if not found.
Note: Never commit your
.env
file or.streamlit/secrets.toml
to version control. Add them to your.gitignore
file to prevent accidental exposure of your API keys.
- 🐑 LLaMA 3 - 70B: Meta's largest model, excelling in complex reasoning and generation tasks
- 🔄 Mixtral - 8x7B: Mistral AI's mixture-of-experts model, combining multiple specialized sub-models
- 🔹 Gemma 2 - 9B: Google's instruction-tuned variant of the Gemma model family
The chatbot now uses LangChain's React agent with the following tools:
- 🌐 Web Search: Utilizes DuckDuckGo for current events and online information
- 🧮 Calculator: Performs mathematical calculations
- 💬 Ask for Information: Prompts the user for additional details when needed
- 🗃️ Database Query: Executes SQL queries on connected databases (when available)
- 🎙️ Whisper Large V3: Advanced spoken language processing (planned integration)
- 📊 Advanced Analytics: User interaction insights
- 🌐 Web Navigation: Improved web content browsing and search
- 🖼️ Multi-modal Interactions: Combine text and visual inputs
- 🗄️ Enhanced Database Integration:
- Improved support for external databases
- Advanced querying and data analysis capabilities
Contributions are welcome! Fork the repository and submit pull requests for features, bug fixes, or improvements.