Class AzureOpenAiCompletionsChain

All Implemented Interfaces:
Chain<Map<String,​String>,​String>

public final class AzureOpenAiCompletionsChain
extends OpenAiCompletionsChain
OpenAiCompletionsChain adopted for usage of Azure OpenAI Services
  • Constructor Details

    • AzureOpenAiCompletionsChain

      public AzureOpenAiCompletionsChain​(String resourceName, String deploymentName, String apiVersion, String promptTemplate, OpenAiCompletionsParameters parameters, String apiKey, com.fasterxml.jackson.databind.ObjectMapper objectMapper, org.springframework.web.reactive.function.client.WebClient webClient)
      Parameters:
      resourceName - Name of the azure resource
      deploymentName - Name of the azure openai service deployment
      apiVersion - The target API Version
      promptTemplate - The template which contains placeholders in the form ${myPlaceholder} that are replaced for input documents before creating a request to a LLM.
      parameters - The OpenAiChatCompletionsParameters allows to finetune requests to the OpenAI API
      apiKey - The API-Key used for Authentication (passed using the "api-key" Header)
      objectMapper - The ObjectMapper used for body serialization and deserialization
      webClient - The WebClient used for executing requests to the OpenAI API
    • AzureOpenAiCompletionsChain

      public AzureOpenAiCompletionsChain​(String resourceName, String deploymentName, String apiVersion, String promptTemplate, OpenAiCompletionsParameters parameters, String apiKey)
      Parameters:
      resourceName - Name of the azure resource
      deploymentName - Name of the azure openai service deployment
      apiVersion - The target API Version
      promptTemplate - The template which contains placeholders in the form ${myPlaceholder} that are replaced for input documents before creating a request to a LLM.
      parameters - The OpenAiChatCompletionsParameters allows to finetune requests to the OpenAI API
      apiKey - The API-Key used for Authentication (passed using the "api-key" Header)
  • Method Details