Table of Contents

Property Choice

Namespace
LMKit.Agents.Tools
Assembly
LM-Kit.NET.dll

Choice

Gets or sets the tool usage mode for this turn.

public ToolChoice Choice { get; set; }

Property Value

ToolChoice

A ToolChoice value indicating whether and how tools may be used. Default is Auto.

Examples

Example: Switching between tool modes

using LMKit.Agents.Tools;

var policy = new ToolCallPolicy();

// For Q&A tasks, allow tool usage
policy.Choice = ToolChoice.Auto;

// For creative writing, disable tools
policy.Choice = ToolChoice.None;

// For data lookup tasks, require tool usage
policy.Choice = ToolChoice.Required;

Remarks

The choice setting determines the basic mode of tool interaction:

  • AutoThe model may optionally call tools if it determines they would be helpful.
  • RequiredThe model must call at least one tool before responding.
  • NoneTools are disabled; the model must respond without any tool calls.
  • SpecificThe model must call the tool specified in ForcedToolName.