Actor#
Actor is a component of Pipeline, that processes the Script.
It is responsible for determining the next node and getting response from it.
The actor acts as a bridge between the user’s input and the dialog graph, making sure that the conversation follows the expected flow.
More details on the processing can be found in the documentation for
Actor.run_component().
- class Actor(**data)[source]#
Bases:
PipelineComponentThe class which is used to process
Contextaccording to theScript.- property computed_name: str#
“actor”
- async run_component(ctx)[source]#
Process the context in the following way: :rtype:
NoneRun pre-transition of the
Context.current_node.Determine and save the next node based on
transitionsof theContext.current_node.Run pre-response of the
Context.current_node.Determine and save the response of the
Context.current_node
- async static _run_processing_parallel(processing, ctx)[source]#
Execute
BaseProcessingfunctions simultaneously, independent of the order.Picked depending on the value of the
Pipeline’s parallelize_processing flag.- Return type:
None
- async static _run_processing_sequential(processing, ctx)[source]#
Execute
BaseProcessingfunctions in-order.Picked depending on the value of the
Pipeline’s parallelize_processing flag.- Return type:
None
- async static _run_processing(processing, ctx)[source]#
Run
BaseProcessingfunctions.The execution order depends on the value of the
Pipeline’s parallelize_processing flag.- Return type:
None