Table of Contents

Method FromMethod

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

FromMethod(object, MethodInfo)

Creates a single ITool from a specific method on the supplied instance.

public static ITool FromMethod(object instance, MethodInfo method)

Parameters

instance object

Target object instance.

method MethodInfo

A method marked with LMFunctionAttribute.

Returns

ITool

An ITool adapter wrapping the given method.

Exceptions

ArgumentNullException

Thrown if instance or method is null.

ArgumentException

Thrown if method is not annotated with LMFunctionAttribute or uses unsupported parameter types.