Class OpenAiAssistantGeneratorAutoConfiguration

java.lang.Object
ai.yda.framework.rag.generator.assistant.openai.autoconfigure.OpenAiAssistantGeneratorAutoConfiguration

@AutoConfiguration @EnableConfigurationProperties({OpenAiAssistantGeneratorProperties.class,org.springframework.ai.autoconfigure.openai.OpenAiConnectionProperties.class}) public class OpenAiAssistantGeneratorAutoConfiguration extends Object
Autoconfiguration class for setting up an OpenAiAssistantGenerator bean. This class automatically configures the necessary components for integrating with the OpenAI API to create an assistant generator. The configuration is based on properties defined in the external configuration files (e.g., application.properties or application.yml) under OpenAiConnectionProperties.CONFIG_PREFIX and OpenAiAssistantGeneratorProperties.CONFIG_PREFIX namespaces.
Since:
0.1.0
See Also:
  • Constructor Details

  • Method Details

    • openAiGenerator

      @Bean public ai.yda.framework.rag.generator.assistant.openai.OpenAiAssistantGenerator openAiGenerator(OpenAiAssistantGeneratorProperties assistantGeneratorProperties, org.springframework.ai.autoconfigure.openai.OpenAiConnectionProperties openAiProperties, ai.yda.framework.session.core.SessionProvider sessionProvider)
      Defines an OpenAiAssistantGenerator bean. This bean is configured using the provided properties for the Assistant Generator and the OpenAI connection. The Generator requires an API key and an Assistant ID, which are retrieved from the external configuration, and a SessionProvider for managing user Sessions.
      Parameters:
      assistantGeneratorProperties - the properties related to the Assistant Generator, providing Assistant ID configuration.
      openAiProperties - the properties related to the OpenAI connection, including the API key.
      sessionProvider - the Session Provider responsible for managing User Sessions.
      Returns:
      a configured OpenAiAssistantGenerator bean ready for use in the application.