Interface LangChain4jAzureOpenAiConfig.AzureAiConfig
- Enclosing interface:
- LangChain4jAzureOpenAiConfig
-
Method Summary
Modifier and TypeMethodDescriptionadToken()
The Azure AD token to use for this operation.apiKey()
Azure OpenAI API keyThe API version to use for this operation.Chat model related settingsThe name of your model deployment.Embedding model related settingsWhether to enable the integration.endpoint()
The endpoint for the Azure OpenAI resource.Image model related settingsWhether the OpenAI client should log requestsWhether the OpenAI client should log responsesDeprecated.Using the fault tolerance mechanisms built in Langchain4j is not recommended.The name of your Azure OpenAI Resource.timeout()
Timeout for OpenAI calls
-
Method Details
-
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 ifquarkus.langchain4j.azure-openai.endpoint
is not set. Ifquarkus.langchain4j.azure-openai.endpoint
is not set then this is never read. -
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 ifquarkus.langchain4j.azure-openai.endpoint
is not set. Ifquarkus.langchain4j.azure-openai.endpoint
is not set then this is never read. -
endpoint
The endpoint for the Azure OpenAI resource.If not specified, then
quarkus.langchain4j.azure-openai.resource-name
andquarkus.langchain4j.azure-openai.deployment-name
are required. In this case the endpoint will be set tohttps://${quarkus.langchain4j.azure-openai.resource-name}.openai.azure.com/openai/deployments/${quarkus.langchain4j.azure-openai.deployment-name}
-
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 ofquarkus.langchain4j.azure-openai.api-key
. -
apiVersion
The API version to use for this operation. This follows the YYYY-MM-DD format -
apiKey
Azure OpenAI API key -
timeout
@ConfigDocDefault("10s") @WithDefault("${quarkus.langchain4j.timeout}") Optional<Duration> timeout()Timeout for OpenAI calls -
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
Whether to enable the integration. Defaults totrue
, which means requests are made to the OpenAI provider. Set tofalse
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
-