Property Tools
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
Tools
Registry of model-callable tools available to this conversation.
Register tools before the first user turn so they are advertised to the model. Tool invocation requires a model that supports tool calls (HasToolCalls).
Example:
if (conversation.Model.HasToolCalls)
{
conversation.Tools.Register(new WebSearchTool());
conversation.ToolPolicy.Choice = ToolChoice.Auto;
}
else
{
conversation.ToolPolicy.Choice = ToolChoice.None; // avoid tool-call attempts
}
public ToolRegistry Tools { get; }