GenAI.Graph.NodeBehaviour behaviour
(GenAI Core v0.3.0)
Copy Markdown
Behaviour Graph Node Elements must adhere to.
Summary
Functions
Define the struct of a node with default fields included.
Define the type of a node with default fields included.
Callbacks
@callback handle(graph_node :: term()) :: {:ok, GenAI.Types.Graph.node_handle()} | {:error, any()}
@callback handle(graph_node :: term(), default :: any()) :: {:ok, GenAI.Types.Graph.node_handle()} | {:error, any()}
@callback id(graph_node :: term()) :: {:ok, GenAI.Types.Graph.node_id()} | {:error, any()}
@callback new() :: struct()