execute • AI Agent SDK

execute: Execute the middleware chain with a final handler.

execute

Method

</div>

This is a method of the MiddlewareChain class in the middleware module.

Execute the middleware chain with a final handler.

Signature

python
def execute(request: Any, final_handler: Callable[[Any], Any]) -> Any

Parameters

ParamField Any

The request object to pass through

ParamField Callable

The actual operation to perform

Returns

ResponseField Any

The result from the chain

Uses

  • final_handler
  • build_chain
  • middleware
  • chain

Used By

Source

View on GitHub

praisonaiagents/hooks/middleware.py at line 119