https://retellai.com/?utm_source=discord&utm_medium=seo logo
in custom llm implementation, we can not interrupt...
# ❓・ai-evy-support
e
@AI Evy in custom llm implementation, we can not interrupt the agent while it is speaking(we send the response messages with no_interruption_allowed as false). is there currently a problem with custom llm agent interruption part?
a
Thanks for tagging me @Erkam. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, when using Custom LLM implementation, the
no_interruption_allowed
field should control whether the agent can be interrupted during speech [(1) ]() . When set to
false
, the agent should be interruptible . However, there is a related community discussion about interruption issues with Custom LLM implementations [(2) ]() . In that case, users experienced inconsistent behavior where certain flags didn't work as expected . For your specific interruption issue, here are some troubleshooting steps based on the documentation: In Response Events: When sending response events, ensure
no_interruption_allowed
is set correctly [(1) ]() : -
no_interruption_allowed: false
should allow interruptions -
no_interruption_allowed: true
prevents interruptions For Agent Interrupt Events: If you need to force an interruption, you can use the agent interrupt event with
no_interruption_allowed: true
recommended to prevent the agent from being interrupted again during that forced speech . Handling User Interruptions: According to community guidance, if a user interrupts while you're generating a response, you can drop the current response and generate a new one [(3) ]() . If you're in the middle of a tool call, you may want to complete it and provide an intermediate wait message . If the interruption behavior is still not working as expected with
no_interruption_allowed: false
, this may indicate a technical issue that would require direct support investigation.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[2] Inconsistent Call Termination with end_call: true in agent_interrupt (Custom LLM)](https://discord.com/channels/1186424376300679209/1290770247153881190) [[3] Discord message from @colinfortuner on 2024-04-16](https://discord.com/channels/1186424376300679209/1186462578310910112/1229936804761833552) ​