I am building an agent with GeminiRealtime. When t...
# ask-ai
w
I am building an agent with GeminiRealtime. When the user disconnects I would like to prompt the model (generate_reply) to do a tool call which summarizes the conversation and saves it to a database. I have tried
on_exit
and
ctx.add_shutdown_callback
. The issue with both is this error:
AgentSession is closing, cannot use generate_reply()
How can I hook in when the user has left, but before the model has been closed?
t
Thanks for reaching out, Colin. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!