on_summary
on_summary
Callback method invoked when a post-prompt summary is received after a conversation ends. Override this method in a subclass to process summaries — for example, saving them to a CRM, triggering follow-up workflows, or logging call outcomes.
A post-prompt must be configured via
set_post_prompt()
for summaries to be generated.
For the full transcript at hangup rather than the summary, register
on_call_end().
To read voice and chat post-prompt bodies with one shape, see
normalize_post_prompt().
The default implementation does nothing. You must override it in a subclass or set a
set_post_prompt_url()
to receive summaries at an external endpoint.
Parameters
summary
The summary object generated by the AI based on your post-prompt instructions.
None if no summary could be extracted from the response.
raw_data
The complete raw POST data from the post-prompt request, including metadata
like call_id and the full AI response.
Returns
None