Table of Contents

Class FunctionManager

Manages and invokes serialized functions with metadata for AI function calling.

public class FunctionManager : MonoBehaviour, IFunctionManager
Inheritance
object
FunctionManager
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

methodName string
jsonArguments string

Returns

JToken

HasFunction(string)

public bool HasFunction(string methodName)

Parameters

methodName string

Returns

bool

OnReceiveToolCalls(ToolCall[])

Handles a tool call and invokes the corresponding function.

public void OnReceiveToolCalls(ToolCall[] toolCalls)

Parameters

toolCalls ToolCall[]