Class ToolChoice
java.lang.Object
com.codename1.ai.ToolChoice
Controls how aggressively the model will call tools. Use the
constants for the three common modes; use
named(String) to force
the model to call a specific tool.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ToolChoiceModel picks freely between calling tools and replying with text.static final ToolChoiceModel must not call any tool -- it must reply with text.static final ToolChoiceModel must call exactly one tool (any tool). -
Method Summary
Modifier and TypeMethodDescriptiongetMode()static ToolChoiceForces the model to call the named tool.
-
Field Details
-
AUTO
Model picks freely between calling tools and replying with text. -
NONE
Model must not call any tool -- it must reply with text. -
REQUIRED
Model must call exactly one tool (any tool). Useful for forcing a structured-output path.
-
-
Method Details
-
named
Forces the model to call the named tool. -
getMode
-
getForcedToolName
-