GenAI.Records.Link (GenAI Core v0.3.1)

Copy Markdown

Records related to graph links.

Summary

Types

Anchor Links point to a handle from the root node and from it's scope a nested local handle. Unlike the standard lookup logic only local handles are considered and we take the closest (first) local handle below the anchor. local_handle may itself be an array / path of local nodes below the anchor handle

Record representing a link connector (target, and socket).

Record container a graph node, the link leading to the node and immeidate parent of the graph node.

Element lookup entries point from the Graph Root to nested elements.

A graph handle are used to reference a graph element by name Global scopes must be unique and can not be overridden locally. Standard scope must be unique but can be overridden by local scoped handles.

Types

anchor_link()

@type anchor_link() ::
  {:anchor_link, anchor_handle :: GenAI.Types.Graph.node_handle(),
   local_handle ::
     GenAI.Types.Graph.node_handle() | [GenAI.Types.Graph.node_handle()]}

Anchor Links point to a handle from the root node and from it's scope a nested local handle. Unlike the standard lookup logic only local handles are considered and we take the closest (first) local handle below the anchor. local_handle may itself be an array / path of local nodes below the anchor handle

connector()

@type connector() ::
  {:connector,
   node ::
     GenAI.Types.Graph.graph_node_id() | {anchor :: term(), handle :: term()},
   socket :: term(), external :: atom()}

Record representing a link connector (target, and socket).

Note

Socket is used for elements with special input output links like grid search to indicate appropriate link to use per state.

element_context()

@type element_context() ::
  {:element_context, element :: term(), link :: term(), container :: term()}

Record container a graph node, the link leading to the node and immeidate parent of the graph node.

element_lookup()

@type element_lookup() ::
  {:element_lookup, element :: term(), path :: list(), type :: module(),
   implementation :: module()}

Element lookup entries point from the Graph Root to nested elements.

graph_handle()

@type graph_handle() ::
  {:graph_handle, scope :: :standard | :local | :global,
   name :: GenAI.Types.Graph.node_handle()}

A graph handle are used to reference a graph element by name Global scopes must be unique and can not be overridden locally. Standard scope must be unique but can be overridden by local scoped handles.

When looking up handles we check for a global first, then a local, and if not local is in scope we check standard entries.

Functions

anchor_link(args \\ [])

(macro)

anchor_link(record, args)

(macro)

connector(args \\ [])

(macro)

connector(record, args)

(macro)

element_context(args \\ [])

(macro)

element_context(record, args)

(macro)

element_lookup(args \\ [])

(macro)

element_lookup(record, args)

(macro)

graph_handle(args \\ [])

(macro)

graph_handle(record, args)

(macro)