action_preprocessor

Module Contents

Classes

ActionPreprocessor

The ActionPreprocessor is a hook that preprocesses the action message

InternLMActionProcessor

The ActionPreprocessor is a hook that preprocesses the action message

class lagent.hooks.action_preprocessor.ActionPreprocessor

Bases: lagent.hooks.hook.Hook

The ActionPreprocessor is a hook that preprocesses the action message and postprocesses the action return message.

before_action(executor, message, session_id)
after_action(executor, message, session_id)
class lagent.hooks.action_preprocessor.InternLMActionProcessor(code_parameter='command')

Bases: ActionPreprocessor

The ActionPreprocessor is a hook that preprocesses the action message and postprocesses the action return message.

参数:

code_parameter (str) –

code_parameter = 'command'
before_action(executor, message, session_id)