Skip to main content
Version: dev

HookConfig Configuration

Hook configuration. You can define a hook configuration with a path and optional parameters. It will be used to dynamically load and execute a hook function or a callable object.

Parameters

NameTypeRequiredDescription
init_paramsobject
Hook init params to pass to the hook constructor(Just for class hook), must be key-value pairs
Defaults:{}
paramsobject
Hook params to pass to the hook, must be key-value pairs
Defaults:{}
enabledboolean
Whether the hook is enabled, default is True
Defaults:True
pathstring
Hook path, it can be a class path or a function path. eg: 'dbgpt.config.hooks.env_var_hook'