Default Extractors#

This module includes a pool of default extractors that you can use out of the box.

The default configuration for Superset dashboard leverages the data collected by the extractors below. In order to use the default charts, make sure that you include those functions in your pipeline. Detailed examples can be found in the tutorials section.

async get_current_label(ctx, pipeline, info)[source]#

Extract the current label on each turn. This function is required for running the dashboard with the default configuration.

Note

Preferrably, it needs to be invoked as after_handler of the Actor service.

async get_timing_before(ctx, _, info)[source]#

Store the pipeline component’s start time inside the context. This function is required for running the dashboard with the default configuration.

async get_timing_after(ctx, _, info)[source]#

Extract the pipeline component’s execution time. Requires get_timing_before() to be called previously in order to calculate the time. This function is required for running the dashboard with the default configuration.

async get_last_request(ctx, _, info)[source]#

Extract the text of the last request in the current context. This handler is best used together with the Actor component.

This function is required to enable charts that aggregate requests and responses.

async get_last_response(ctx, _, info)[source]#

Extract the text of the last response in the current context. This handler is best used together with the Actor component.

This function is required to enable charts that aggregate requests and responses.