nat.plugins.autogen.tool_wrapper#

Tool wrapper for AutoGen integration with NAT.

Attributes#

Functions#

resolve_type(→ Any)

Return the non-None member of a Union/PEP 604 union;

autogen_tool_wrapper(→ Any)

Wrap a NAT Function as an AutoGen FunctionTool.

Module Contents#

logger#
resolve_type(t: Any) Any#

Return the non-None member of a Union/PEP 604 union; otherwise return the type unchanged.

Args:

t (Any): The type to resolve.

Returns:

Any: The resolved type.

autogen_tool_wrapper(
name: str,
fn: nat.builder.function.Function,
_builder: nat.builder.builder.Builder,
) Any#

Wrap a NAT Function as an AutoGen FunctionTool.

Args:

name (str): The name of the tool. fn (Function): The NAT function to wrap. _builder (Builder): The NAT workflow builder to access registered components.

Returns:

Any: The AutoGen FunctionTool wrapping the NAT function.