Class FunctionManager
- Namespace
- Glitch9.AIDevKit.Components
Manages and invokes serialized functions with metadata for AI function calling.
public class FunctionManager : MonoBehaviour, IFunctionManager
- Inheritance
-
objectFunctionManager
- Implements
- Extension Methods
Properties
Functions
public List<FunctionReference> Functions { get; }
Property Value
- List<FunctionReference>
IsEmpty
List of functions registered in this manager.
public bool IsEmpty { get; }
Property Value
- bool
Methods
ExecuteFunction(string, string)
Invokes a function by name with JSON-serialized arguments.
public JToken ExecuteFunction(string methodName, string jsonArguments)
Parameters
methodNamestringjsonArgumentsstring
Returns
- JToken
HasFunction(string)
public bool HasFunction(string methodName)
Parameters
methodNamestring
Returns
- bool
OnReceiveToolCalls(ToolCall[])
Handles a tool call and invokes the corresponding function.
public void OnReceiveToolCalls(ToolCall[] toolCalls)
Parameters
toolCallsToolCall[]