Skip to main content

resolve_trace_hook

Function
This function is defined in the protocols module.
Return hook when a tracer is supplied, else the no-op default. A tiny helper so a gateway can accept an optional tracer= argument and always hold a callable hook without branching on None at every stage.

Signature

Parameters

'Optional[GatewayTraceHook]'
required
A user/plugin-supplied trace hook, or None.

Returns

'GatewayTraceHook'
data:NULL_GATEWAY_TRACE_HOOK.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 4897

Hooks Concept

Hook Events

Callbacks