Module agentforge4j.bootstrap
Package com.agentforge4j.bootstrap
Class LlmProviderConfig.ProviderBuilder
java.lang.Object
com.agentforge4j.bootstrap.LlmProviderConfig.ProviderBuilder
- Enclosing class:
- LlmProviderConfig
Builder for
LlmProviderConfig. Obtain via LlmProviderConfig.openai(), LlmProviderConfig.claude(), etc.-
Method Summary
Modifier and TypeMethodDescriptionSets the API key.apiKeyReference(LlmSecretReference apiKeyReference) Sets the credential as a reference (literal orenv:/sysprop:indirect).Overrides the provider base URL.build()Builds theLlmProviderConfig.connectTimeout(Duration connectTimeout) Overrides the provider connect timeout.defaultModel(String defaultModel) Overrides the provider default model.defaults()No-op kept purely for call-site readability, e.g.Sets a provider-specific option (canonical dotted key, e.g.
-
Method Details
-
defaults
No-op kept purely for call-site readability, e.g.openai().defaults().apiKey(...).build(). The builder's recommended defaults (baseUrl,defaultModel,connectTimeout) are already set by the static factory method that created it (e.g.LlmProviderConfig.openai()); calling this method does not populate, refresh, or otherwise change anything.- Returns:
thisfor chaining, unchanged
-
apiKey
Sets the API key.- Parameters:
apiKey- the API key; must not be blank- Returns:
thisfor chaining
-
apiKeyReference
Sets the credential as a reference (literal orenv:/sysprop:indirect).- Parameters:
apiKeyReference- the credential reference; must not benull- Returns:
thisfor chaining
-
option
Sets a provider-specific option (canonical dotted key, e.g.request.timeout).- Parameters:
key- the option key; must not be blankvalue- the option value; must not be blank- Returns:
thisfor chaining
-
baseUrl
Overrides the provider base URL.- Parameters:
baseUrl- override the provider base URL; must not be blank- Returns:
thisfor chaining
-
defaultModel
Overrides the provider default model.- Parameters:
defaultModel- override the provider default model; must not be blank- Returns:
thisfor chaining
-
connectTimeout
Overrides the provider connect timeout.- Parameters:
connectTimeout- override the provider connect timeout; must not be null- Returns:
thisfor chaining
-
build
Builds theLlmProviderConfig.- Returns:
- immutable config; never
null
-