Interface LangChain4jOpenAiConfig.OpenAiConfig
- Enclosing interface:
- LangChain4jOpenAiConfig
public static interface LangChain4jOpenAiConfig.OpenAiConfig
-
Method Summary
Modifier and TypeMethodDescriptionapiKey()
OpenAI API keybaseUrl()
Base URL of OpenAI APIChat model related settingsEmbedding model related settingsWhether to enable the integration.Image model related settingsWhether the OpenAI client should log requestsWhether the OpenAI client should log responsesDeprecated.Using the built-in fault tolerance mechanisms is not recommended.Moderation model related settingsOpenAI Organization ID (https://platform.openai.com/docs/api-reference/organization-optional)timeout()
Timeout for OpenAI calls
-
Method Details
-
baseUrl
Base URL of OpenAI API -
apiKey
OpenAI API key -
organizationId
OpenAI Organization ID (https://platform.openai.com/docs/api-reference/organization-optional) -
timeout
@ConfigDocDefault("10s") @WithDefault("${quarkus.langchain4j.timeout}") Optional<Duration> timeout()Timeout for OpenAI calls -
maxRetries
Deprecated.Using the built-in fault tolerance mechanisms 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 -
moderationModel
ModerationModelConfig moderationModel()Moderation model related settings -
imageModel
ImageModelConfig imageModel()Image model related settings
-