metaprompting.state.State

class metaprompting.state.State[source]

Bases: ABC

A static node holding information generated by an input_action. It may pass on the information to zero or more output_actions.

Parameters:
  • input_action – Input Action

  • output_actions – Iterable over output Actions

Public Methods:

__init__()

A static node holding information generated by an input_action.

set_input_action(action[, force])

add_output_actions(actions)

trigger_outputs()

Trigger all outputs of this State.

update(value, *args, **kwargs)

Private Data Attributes:

_abc_impl

Inherited from ABC

_abc_impl


__abstractmethods__ = frozenset({})
__annotations__ = {}
__dict__ = mappingproxy({'__module__': 'metaprompting.state', '__init__': <function State.__init__>, 'set_input_action': <function State.set_input_action>, 'add_output_actions': <function State.add_output_actions>, 'trigger_outputs': <function State.trigger_outputs>, 'update': <function State.update>, '__dict__': <attribute '__dict__' of 'State' objects>, '__weakref__': <attribute '__weakref__' of 'State' objects>, '__doc__': None, '__abstractmethods__': frozenset(), '_abc_impl': <_abc._abc_data object>, '__annotations__': {}})
__init__()[source]

A static node holding information generated by an input_action. It may pass on the information to zero or more output_actions.

Parameters:
  • input_action – Input Action

  • output_actions – Iterable over output Actions

__module__ = 'metaprompting.state'
__slots__ = ()
__weakref__

list of weak references to the object (if defined)

_abc_impl = <_abc._abc_data object>
add_output_actions(actions)[source]
set_input_action(action, force=False)[source]
trigger_outputs()[source]

Trigger all outputs of this State. Should typically be called at the end of update().

update(value, *args, **kwargs)[source]