Interface LangChain4jAzureOpenAiConfig.AzureAiConfig

Enclosing interface:
LangChain4jAzureOpenAiConfig

public static interface LangChain4jAzureOpenAiConfig.AzureAiConfig
  • Method Details

    • resourceName

      Optional<String> resourceName()
      The name of your Azure OpenAI Resource. You're required to first deploy a model before you can make calls.

      This and quarkus.langchain4j.azure-openai.deployment-name are required if quarkus.langchain4j.azure-openai.endpoint is not set. If quarkus.langchain4j.azure-openai.endpoint is set then this is never read.

    • domainName

      @WithDefault("openai.azure.com") Optional<String> domainName()
      The domain name of your Azure OpenAI Resource. You're required to first deploy a model before you can make calls.

      This and quarkus.langchain4j.azure-openai.domain-name are required if quarkus.langchain4j.azure-openai.endpoint is not set. If quarkus.langchain4j.azure-openai.endpoint is set then this is never read.

    • deploymentName

      Optional<String> deploymentName()
      The name of your model deployment. You're required to first deploy a model before you can make calls.

      This and quarkus.langchain4j.azure-openai.resource-name are required if quarkus.langchain4j.azure-openai.endpoint is not set. If quarkus.langchain4j.azure-openai.endpoint is set then this is never read.

    • endpoint

      Optional<String> endpoint()
      The endpoint for the Azure OpenAI resource.

      If not specified, then quarkus.langchain4j.azure-openai.resource-name, quarkus.langchain4j.azure-openai.domain-name (defaults to "openai.azure.com") and quarkus.langchain4j.azure-openai.deployment-name are required. In this case the endpoint will be set to https://${quarkus.langchain4j.azure-openai.resource-name}.${quarkus.langchain4j.azure-openai.domain-name}/openai/deployments/${quarkus.langchain4j.azure-openai.deployment-name}

    • adToken

      Optional<String> adToken()
      The Azure AD token to use for this operation. If present, then the requests towards OpenAI will include this in the Authorization header. Note that this property overrides the functionality of quarkus.langchain4j.azure-openai.api-key.
    • apiVersion

      @WithDefault("2023-05-15") String apiVersion()
      The API version to use for this operation. This follows the YYYY-MM-DD format
    • apiKey

      Optional<String> apiKey()
      Azure OpenAI API key
    • timeout

      @ConfigDocDefault("10s") @WithDefault("${quarkus.langchain4j.timeout}") Optional<Duration> timeout()
      Timeout for OpenAI calls
    • maxRetries

      @WithDefault("1") Integer maxRetries()
      Deprecated.
      Using the fault tolerance mechanisms built in Langchain4j is not recommended. If possible, use MicroProfile Fault Tolerance instead.
      The maximum number of times to retry. 1 means exactly one attempt, with retrying disabled.
    • logRequests

      @ConfigDocDefault("false") @WithDefault("${quarkus.langchain4j.log-requests}") Optional<Boolean> logRequests()
      Whether the OpenAI client should log requests
    • logResponses

      @ConfigDocDefault("false") @WithDefault("${quarkus.langchain4j.log-responses}") Optional<Boolean> logResponses()
      Whether the OpenAI client should log responses
    • enableIntegration

      @WithDefault("true") Boolean enableIntegration()
      Whether to enable the integration. Defaults to true, which means requests are made to the OpenAI provider. Set to false to disable all requests.
    • chatModel

      ChatModelConfig chatModel()
      Chat model related settings
    • embeddingModel

      EmbeddingModelConfig embeddingModel()
      Embedding model related settings
    • imageModel

      ImageModelConfig imageModel()
      Image model related settings
    • domainNameFor

    • endPointFor

    • resourceNameFor

    • deploymentNameFor