Class DecisionConfig
EasyAI.decide(...) — the cheap, probability-returning decision call.
Resolution order (first non-blank wins)
- provider:
easyai.decision.provider→easyai.provider→"openai" - API key:
easyai.decision.api-key→easyai.api-key - base URL:
easyai.decision.base-url→easyai.base-url - model:
easyai.decision.model-name→ "gpt-6-luna"
⚠ Read this if your chat provider is not OpenAI
A decision model is a dedicated endpoint, not a chat completion with an extra parameter.
OpenAI serves it at POST {baseUrl}/decisions with its own small model. OpenAI-compatible
chat providers such as Groq or DeepSeek do not implement that endpoint at all and answer
404, so "OpenAI-compatible" buys you nothing here. So unlike
voice, where inheriting the chat endpoint is almost always
right, here inheritance is only right when your chat provider is OpenAI.
If it is not, set both explicitly:
easyai.decision.api-key=sk-... easyai.decision.base-url=https://api.openai.com/v1/
We inherit anyway rather than guessing, because a provider-level authentication or 404 error is unambiguous, whereas a library quietly swapping your endpoint is not.
Analogy: a precision instrument that needs mains power. It will accept the socket the rest of the workshop uses, but if that socket is a different voltage you must say so — the instrument is not going to guess, and a blown fuse tells you more than a silent adapter.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classFluent builder forDecisionConfig; see the class documentation for defaults. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionapiKey()baseUrl()static DecisionConfig.Builderbuilder()static DecisionConfigLoad the decision configuration fromeasyai.properties, falling back to the chat settings as described in the class documentation.provider()toString()
-
Field Details
-
DEFAULT_MODEL
Default decision model. OpenAI exposes a dedicated, small model for this call — it is not a chat model, which is the whole point: one fast, cheap call instead of a full generation.- See Also:
-
-
Method Details
-
provider
- Returns:
- the provider id, e.g.
"openai".
-
apiKey
- Returns:
- the API key, or
nullif none was configured.
-
baseUrl
- Returns:
- the base URL override, or
nullto use the provider's default.
-
modelName
- Returns:
- the decision model name.
-
toBuilder
- Returns:
- a builder pre-filled with this configuration, for making a modified copy.
-
builder
- Returns:
- a new, empty builder.
-
forDeciding
Load the decision configuration fromeasyai.properties, falling back to the chat settings as described in the class documentation.- Returns:
- settings for
EasyAI.decide(String)
-
toString
-