Provide a way to have dependency injection from actions
Opened this issue · 0 comments
fabioz commented
Why & who
For instance, sema4ai-di-client
uses a private api to get the x-action-context
. It should be able to get the Request
at any point in the program.
Feature or enhancement
The API still needs to be decided.
Maybe something as the code below could be an option:
@inject_action_context
def my_method(request: Request, action: IAction, other_arg, **kwargs):
...
Solution & alternative
No response