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

Records related to graph links.

Link to this section 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.

Link to this section Types

Link to this type

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

@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

Note

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

Link to this type

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.

Link to this type

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.

Link to this type

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.

Link to this section Functions

Link to this macro

anchor_link(args \\ [])

(macro)
Link to this macro

anchor_link(record, args)

(macro)
Link to this macro

connector(args \\ [])

(macro)
Link to this macro

connector(record, args)

(macro)
Link to this macro

element_context(args \\ [])

(macro)
Link to this macro

element_context(record, args)

(macro)
Link to this macro

element_lookup(args \\ [])

(macro)
Link to this macro

element_lookup(record, args)

(macro)
Link to this macro

graph_handle(args \\ [])

(macro)
Link to this macro

graph_handle(record, args)

(macro)