GenericFunctionTool Class

GenericFunctionTool provides a generic implementation of the IFunctionTool interface, allowing seamless interaction with a collection of tools and their corresponding functions. It utilizes the code generation capabilities available in CSharpToJsonSchema for transforming tool definitions into executable formats and managing function invocations.

Definition

Namespace: GenerativeAI.Tools
Assembly: GenerativeAI.Tools (in GenerativeAI.Tools.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public class GenericFunctionTool : IFunctionTool
Inheritance
Object    GenericFunctionTool
Implements
IFunctionTool

Constructors

GenericFunctionTool Represents a generic functional tool that enables interaction with a set of tools and their associated functions, facilitating the conversion of provided tools into a compatible format for execution and integration.

Properties

Methods

AsTool Converts the current instance to a Tool object.
CallAsync Executes the specified FunctionCall asynchronously and retrieves the resulting FunctionResponse containing any output from the function execution.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
IsContainFunction Determines whether the specified function exists within the current tool's context.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also