This project consists of multiple microservices working together using Docker and NATS for communication. The services include an AI agent, refund API, Telegram bot, and PostgreSQL database.
/
├── aiagent/ # AI Agent service
├── refund_api/ # Refund API service
├── telegram_bot/ # Telegram bot service
├── .env # Environment variables (not to be committed)
├── .gitignore # Git ignore file
├── docker-compose1.yml # Docker Compose file
- Docker & Docker Compose
- Git
- Clone the repository:
git clone <repository-url> cd <repository-folder>
- Create a
.env
file and configure the necessary environment variables:TELEGRAM_BOT_TOKEN=your_token_here OPENAI_API_KEY=your_api_key_here NATS_SERVER="nats://nats:4222"
- Start the services using Docker Compose:
docker-compose -f docker-compose1.yml up -d
- AI Agent: Handles AI-related tasks.
- Refund API: Manages refund processing.
- Telegram Bot: Interfaces with users via Telegram.
- NATS Server: Message broker for inter-service communication.
- PostgreSQL Database: Stores refund-related data.
- Fetches historical refund data.
- Uses Z-Score and Isolation Forest to detect anomalies in refund requests.
- Calls OpenAI's GPT-4 API for AI-based fraud analysis.
- Makes final refund decisions based on ML and AI results.
- Communicates results via NATS messaging.
- Access the Refund API at
http://localhost:8080
- Monitor NATS at
http://localhost:8222
- Fork the repository.
- Create a new feature branch.
- Commit your changes.
- Push to your branch and open a pull request.
This project is licensed under MIT License.