Sanitize model responses before returning to the user.
This hook is called after the model generates a response. We sanitize the AI's response to ensure it doesn't contain harmful content.
| Name | Type | Description |
|---|---|---|
state* | lc_agents.AgentState | Current agent state containing messages. |
runtime* | Runtime | Runtime object containing context and configuration. |