ToolChoice

Whether the LLM should call a tool, no tool, a specific tool, etc.

Since

0.3.0-beta01

Inheritors

Types

Link copied to clipboard
@SerialName(value = "auto")
data object Auto : ToolChoice

Let the provider/model decide whether to call a tool.

Link copied to clipboard
@SerialName(value = "none")
data object None : ToolChoice

Prevent tool calls for this request.

Link copied to clipboard
@SerialName(value = "required")
data object Required : ToolChoice

Require at least one tool call when the provider supports this mode.

Link copied to clipboard
@SerialName(value = "specific")
class Specific(val toolName: String) : ToolChoice

Request a specific named tool.