metaprompting.graph.Graph

class metaprompting.graph.Graph(states=(), actions=())[source]

Bases: object

Public Methods:

__init__([states, actions])

add_states(states)

add_actions(actions)

connect_action(input_nodes, action, output_node)

Private Methods:

_assert_is_node(node[, add])


__annotations__ = {}
__dict__ = mappingproxy({'__module__': 'metaprompting.graph', '__init__': <function Graph.__init__>, 'add_states': <function Graph.add_states>, 'add_actions': <function Graph.add_actions>, '_assert_is_node': <function Graph._assert_is_node>, 'connect_action': <function Graph.connect_action>, '__dict__': <attribute '__dict__' of 'Graph' objects>, '__weakref__': <attribute '__weakref__' of 'Graph' objects>, '__doc__': None, '__annotations__': {}})
__init__(states=(), actions=())[source]
__module__ = 'metaprompting.graph'
__weakref__

list of weak references to the object (if defined)

_assert_is_node(node, add=False)[source]
add_actions(actions)[source]
add_states(states)[source]
connect_action(input_nodes, action, output_node, force=False, add=False)[source]