A very simple Python-based intelligent banking chatbot that uses LangChain and Groq LLM to understand and respond to various banking queries.
- Natural language understanding for banking queries
- Categorizes user requests into 7 distinct categories:
- Balance Inquiries
- Transactions
- Payments
- Deposit and Withdrawal Queries
- Spending Limits and Budgeting
- General Account Information
- Assistance and Help
- Template-based response generation
- Secure handling of sensitive banking information
- Interactive command-line interface
- Python 3.x
- Groq API key
langchain-groq
langchain-core
python-dotenv- Clone this repository
- Install required dependencies using requirements.txt:
Alternatively, you can install packages individually:
pip install -r requirements.txt
pip install langchain-groq langchain-core python-dotenv
- Create a
.envfile in the root directory and add your Groq API key:GROQ_API_KEY=your_api_key_here
Run the script using:
python respond_to_user.pyThe chatbot will start in interactive mode. You can:
- Type your banking queries naturally
- Exit by typing 'quit', 'exit', 'x', or 'q'
Example queries:
You: What's my current balance?
You: Can I transfer money to John?
You: Show me recent transactions
- The chatbot first categorizes user input into one of seven predefined categories using the
understand_category()function - Based on the category, it selects an appropriate response template
- The template is processed using the Groq LLM to generate a contextual response
- Additional follow-up prompts are provided after each response
respond_to_user.py: Main script containing the chatbot logic- Templates for different query types:
- Balance template
- Payments template
- Transaction history template
- Account information template
- General assistance template
A Python-based speech recognition and translation tool that supports multiple Indian languages, enabling voice-based interactions with translation capabilities.
- Speech recognition for multiple languages (Hindi, Tamil, Telugu, Bengali, Malayalam, English)
- Real-time speech-to-text translation
- Text-to-speech functionality
- Language auto-detection
- Cross-platform support (Windows, Linux, macOS)
- Python 3.7+
- Internet connection for translation and speech services
pip install -r requirements.txt- SpeechRecognition
- deep-translator
- gTTS (Google Text-to-Speech)
- pydub
- langdetect
For Windows users experiencing PyAudio installation issues:
pip install pipwin
pipwin install pyaudio- Platform-specific sound modules (automatically handled)
- winsound (for Windows)
- For Linux/macOS sound support, install 'sox' system package
Run the script:
python speech6.py- Change native language
- Start conversation (speech recognition and translation)
- List App Options in Hindi and Tamil
- Exit
- Google Translator API
- Google Speech Recognition
- Google Text-to-Speech
- English
- Hindi
- Tamil
- Telugu
- Bengali
- Malayalam
- Requires active internet connection
- Microphone access needed for speech recognition
- Some features may have limitations based on network and speech recognition accuracy
- Ensure all required packages are installed
- Check microphone permissions
- Verify stable internet connection
Please raise an issue if any of the above is not clear or doesn't work.