A Java-based product recommendation system that uses OpenAI's GPT API to provide personalized product recommendations and sentiment analysis for customer reviews.
- Product recommendations based on user input
- Multi-profile recommendations
- Sentiment analysis for product reviews
- Token usage tracking and cost calculation
- CSV file processing support
- Java 21
- Maven
- OpenAI GPT API (simple-openai)
- JTokkit for token counting
src/
├── main/
│ ├── java/
│ │ └── dev/raniery/ecommerce/
│ │ ├── details/ # System configurations
│ │ ├── functions/ # Core functionality
│ │ └── IntegrationTest # OpenAI API integration
│ └── resources/
│ ├── clients10.csv # Sample client data
│ ├── clients100.csv # Extended client data
│ └── reviews/ # Product review files
└── test/
└── java/ # Test classes (not yet)
- Clone the repository
- Copy
.envexample
to.env
and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
- Build the project:
mvn clean install
- simple-openai - OpenAI API client
- java-dotenv - Environment variable management
- jtokkit - Token counting