Skip to content

Configure failure_error_function in FunctionTool class #1367

@panilya

Description

@panilya

Describe the feature

In the @function_tool is it possible to provide custom failure_error_function: ToolErrorFunction | None = default_tool_error_function.

However, when trying to init FunctionTool via class FunctionTool it is not possible to configure failure_error_function and the default one is used.

Please, add support of ToolErrorFunction configuration in class FunctionTool

Expected result:

    function_tool = FunctionTool(
      name=action.name,
      description=action.description,
      params_json_schema=schema,
      on_invoke_tool=handle_tool_call_invoke,
      failure_error_function=tool_error_function <---- new field
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions