Cell API
    Preparing search index...

    Interface FunctionCallback

    Represents a model function call handler. Implementations are registered with the Models and called on prompts that trigger the function call.

    interface FunctionCallback {
        description: string;
        inputTypeSchema: string;
        name: string;
        call(functionArguments: string, toolContext?: ToolContext): Promise<string>;
    }
    Index
    description: string

    The function description. This description is used by the model do decide if the function should be called or not.

    inputTypeSchema: string

    The JSON schema of the function input type.

    name: string

    The Function name. Unique within the model.

    • Called when a model detects and triggers a function call. The model is responsible to pass the function arguments in the pre-configured JSON schema format.

      Parameters

      • functionArguments: string

        JSON string with the function arguments to be passed to the function. The arguments are defined as JSON schema usually registered with the the model.

      • OptionaltoolContext: ToolContext

        Optional tool context to be passed to the function call.

      Returns Promise<string>

      String containing the function call response.