nemoguardrails.colang.runtime
Module Contents
Classes
Data
API
Base Colang Runtime implementation.
Return registered actions.
Generates the next events based on the provided history.
This is a wrapper around the process_events method, that will keep
processing the events until the listen event is produced.
:return: The list of events.
Parameters:
The list of events.
The processing log so far. This will be mutated.
Process a sequence of events in a given state.
The events will be processed one by one, in the input order.
Parameters:
A sequence of events that needs to be processed.
The state that should be used as the starting point. If not provided, a clean state will be used.
In blocking mode, the event processing will also wait for all local async actions.
Returns: Tuple[List[dict], Any]
(output_events, output_state) Returns a sequence of output events and an output state.
Registers an action with the given name.
:param name: The name of the action. :param action: The action function. :param override: If an action already exists, whether it should be overriden or not.
Registers an additional parameter that can be passed to the actions.
:param name: The name of the parameter. :param value: The value of the parameter.
Registers all the actions from the given object.