Package com.tnsai.metadata
Interface ActionHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Dispatch callback for a programmatically-defined action (TNS-551) — the
lambda body of an
ActionConfig / RoleBuilder.addAction(...)
action, the programmatic counterpart of an @ActionSpec-annotated
method body.
Receives the resolved parameter map and returns the action result, which
ActionExecutor serializes back to the caller the
same way it handles a reflective method return. Mirrors the shape of
DynamicToolMethod.Handler but for role-level
action dispatch rather than agent-level LLM tool calling.
- Since:
- 0.11.0
- Author:
- TnsAI Team
- See Also:
-
Method Summary
-
Method Details
-
invoke
Executes the action body.- Parameters:
params- the resolved parameter map (LLM/caller arguments)- Returns:
- the action result
- Throws:
Exception- any exception thrown by the action body
-