Java project demonstrating integration patterns with the OpenAI API for text analysis workflows.
Projeto em Java com exemplos praticos de uso da API da OpenAI para analise de sentimentos, categorizacao de produtos e identificacao de perfil. O foco e demonstrar integracao, tratamento de erros e controle de custo via tokens.
- Sentiment analysis pipeline (
FeelingAnalyzer) - Product categorization (
ProductCategorizer) - Profile identification (
ProfileIdentifier) - Token counting utility (
Tokenizer) - Integration entrypoint (
TestaIntegracao)
- Java 17
- Maven
com.theokanning.openai-gpt3-javajtokkit
- Set your API key:
# Windows (PowerShell)
$env:OPENAI_API_KEY="your-key"- Build:
mvn clean package- Run from your IDE (example:
TestaIntegracao.java).
- This repository is focused on integration learning and experimentation.
- For production use, migrate to the latest official OpenAI Java SDK and add secure configuration management.
MIT