Class OpenAiChatGeneratorAutoConfiguration

java.lang.Object
ai.yda.framework.rag.generator.chat.openai.autoconfigure.OpenAiChatGeneratorAutoConfiguration

@AutoConfiguration public class OpenAiChatGeneratorAutoConfiguration extends Object
Autoconfiguration class for setting up a Generator bean that uses the OpenAI Chat model. This class automatically configures a Generator for generating responses using OpenAI's Chat model. The configuration relies on an OpenAiChatModel instance, which contains the necessary configurations and parameters to interact with the OpenAI API.
Since:
0.1.0
See Also:
  • Generator
  • OpenAiChatModel
  • Constructor Details

  • Method Details

    • openAiGenerator

      @Bean public ai.yda.framework.rag.core.generator.Generator<ai.yda.framework.rag.core.model.RagRequest,ai.yda.framework.rag.core.model.RagResponse> openAiGenerator(org.springframework.ai.openai.OpenAiChatModel chatModel)
      Defines a Generator bean that utilizes an OpenAiChatModel to generate Responses. This method creates and returns an instance of OpenAiChatGenerator, which is a concrete implementation of Generator. It uses the provided OpenAiChatModel to interact with OpenAI's Chat model and generate Responses based on the input Requests.
      Parameters:
      chatModel - the OpenAiChatModel instance that provides configurations and parameters for interacting with the OpenAI API.
      Returns:
      a Generator instance that generates Responses using the OpenAI Chat model.