A conversational banking assistant that helps customers check their account balances and related information through a natural language interface.
- Secure account authentication flow
- Mobile number-based account lookup
- PIN verification
- Account balance and details retrieval
- Support for IVR and web interfaces
- API Layer: Clean interface for banking API interactions
- Mock client for development
- Real client for production use
- Services Layer: Business logic independent of API implementation
- Chat Layer: Conversation management with OpenAI integration
-
Install Dependencies:
pip install -r requirements.txt --no-deps
-
Set Environment Variables:
export OPENAI_API_KEY=your_api_key_here export USE_REAL_API=false # Use "true" for production
-
Run the Server:
python server.py
-
Run the Client: In a new terminal, run:
python client.py
- System auto-detects mobile number (in IVR) or asks for it
- Multiple accounts are retrieved and presented to the user
- User confirms by providing last 4 digits of account number
- User authenticates with PIN
- Account details are displayed
To use real banking APIs instead of mock data:
- Set
USE_REAL_API=true
environment variable - Configure API credentials as needed
- Add new API methods to
BankingAPIClient
interface - Implement in both
MockBankingAPIClient
andRealBankingAPIClient
- No changes needed to business logic when switching between mock and real APIs