aiq.data_models.invocation_node#

Classes#

InvocationNode

Represents a node in an invocation call graph.

Module Contents#

class InvocationNode(/, **data: Any)#

Bases: pydantic.BaseModel

Represents a node in an invocation call graph.

The InvocationNode class encapsulates the details of a specific function invocation within a call graph. It stores the unique identifier of the invocation, the function name, and optional details about the parent node (if any). This class is useful for tracing the execution flow in a system or application.

Attributes:

function_id (str): Unique identifier for the function invocation. function_name (str): Name of the function invoked. parent_id (str | None): Unique identifier of the parent invocation, if applicable. Defaults to None. parent_name (str | None): Name of the parent function invoked, if applicable. Defaults to None.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

function_id: str#
function_name: str#
parent_id: str | None = None#
parent_name: str | None = None#