Property ToolPolicy
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
ToolPolicy
Per-turn tool-calling policy used by the conversation runtime.
Controls whether tools are allowed, required, disabled, or whether a specific tool must be used on the current turn. This object guides the runtime; it does not enforce behavior on its own.
ForcedToolName
.
Keep AllowParallelCalls
= false
unless your tools are idempotent and thread-safe.
Example:
conversation.ToolPolicy.Choice = ToolChoice.Specific;
conversation.ToolPolicy.ForcedToolName = "web_search";
conversation.ToolPolicy.MaxCallsPerTurn = 2;
public ToolCallPolicy ToolPolicy { get; }