Class OpenAIIntegrationService
java.lang.Object
com.bluebell.greenhouse.sol.services.openai.OpenAIIntegrationService
- All Implemented Interfaces:
GenericIntegrationService
OpenAI API implementation of
GenericIntegrationService for symbol enrichment.- Version:
- 2.0.2
- Author:
- Stephen Prizio
-
Constructor Summary
ConstructorsConstructorDescriptionOpenAIIntegrationService(OpenAIIntegrationClient openAIIntegrationClient, OpenAIResponseTranslator openAIResponseTranslator, com.fasterxml.jackson.databind.ObjectMapper objectMapper, io.github.cdimascio.dotenv.Dotenv dotenv) Creates a new integration service.OpenAIIntegrationService(OpenAIIntegrationClient openAIIntegrationClient, OpenAIResponseTranslator openAIResponseTranslator, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String responsesUrl, String apiKey, String model) Creates a new integration service with explicit configuration values.OpenAIIntegrationService(OpenAIIntegrationClient openAIIntegrationClient, OpenAIResponseTranslator openAIResponseTranslator, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String responsesUrl, String apiKey, String model, boolean enabled) Creates a new integration service with explicit configuration values. -
Method Summary
Modifier and TypeMethodDescriptionenrichSymbol(String category, Set<SymbolRegistryAttribute> requestedAttributes, String ticker) Enriches a single symbol through the OpenAI Responses API.enrichSymbols(String category, Set<SymbolRegistryAttribute> requestedAttributes, List<String> tickers) Enriches the given tickers through the OpenAI Responses API.
-
Constructor Details
-
OpenAIIntegrationService
@Autowired public OpenAIIntegrationService(OpenAIIntegrationClient openAIIntegrationClient, OpenAIResponseTranslator openAIResponseTranslator, com.fasterxml.jackson.databind.ObjectMapper objectMapper, io.github.cdimascio.dotenv.Dotenv dotenv) Creates a new integration service.- Parameters:
openAIIntegrationClient- integration clientopenAIResponseTranslator- raw response translatorobjectMapper-ObjectMapperdotenv-Dotenv
-
OpenAIIntegrationService
public OpenAIIntegrationService(OpenAIIntegrationClient openAIIntegrationClient, OpenAIResponseTranslator openAIResponseTranslator, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String responsesUrl, String apiKey, String model) Creates a new integration service with explicit configuration values.- Parameters:
openAIIntegrationClient- integration clientopenAIResponseTranslator- raw response translatorobjectMapper-ObjectMapperresponsesUrl- responses urlapiKey- api keymodel- model
-
OpenAIIntegrationService
public OpenAIIntegrationService(OpenAIIntegrationClient openAIIntegrationClient, OpenAIResponseTranslator openAIResponseTranslator, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String responsesUrl, String apiKey, String model, boolean enabled) Creates a new integration service with explicit configuration values.- Parameters:
openAIIntegrationClient- integration clientopenAIResponseTranslator- raw response translatorobjectMapper-ObjectMapperresponsesUrl- responses urlapiKey- api keymodel- modelenabled- true when outbound OpenAI calls are enabled
-
-
Method Details
-
enrichSymbol
public SymbolEnrichmentDTO enrichSymbol(String category, Set<SymbolRegistryAttribute> requestedAttributes, String ticker) Enriches a single symbol through the OpenAI Responses API.- Parameters:
category- registry categoryrequestedAttributes- requested attributesticker- ticker- Returns:
SymbolEnrichmentDTO
-
enrichSymbols
public List<SymbolEnrichmentDTO> enrichSymbols(String category, Set<SymbolRegistryAttribute> requestedAttributes, List<String> tickers) Enriches the given tickers through the OpenAI Responses API.- Parameters:
category- registry categoryrequestedAttributes- requested attributestickers- tickers- Returns:
ListofSymbolEnrichmentDTO
-