https://retellai.com/?utm_source=discord&utm_medium=seo logo
currently we are using retell custom llm and there...
# ❓・ai-evy-support
e
@AI Evy currently we are using retell custom llm and there is an issue where retell sends multiple response required messages in the same turn. we are playing with response eagerness and similar configs but it seems it is doing this pretty often. also there seems no way to detect if a message is final update for that turn. how can we resolve this issue, is there any way to make this better?
a
Thanks for tagging me @Erkam. I'll look through relevant sources and get back to you shortly.
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] Custom LLM Overview](https://docs.retellai.com/integrate-llm/overview) [[2] Discord message from @colinfortuner on 2024-04-16](https://discord.com/channels/1186424376300679209/1186462578310910112/1229936804761833552) [[3] New LLM Model Options, Modular Pricing, And More](https://www.retellai.com/changelog/new-llm-model-options-modular-pricing-and-more) ​
### Answer Based on the available sources, I found some relevant information about handling custom LLM interactions with Retell AI. When using custom LLM integration, the documentation mentions that your server needs to check for
interaction_type
in the JSON messages from Retell [(1) ]() . If the
interaction_type
is
response_required
, you need to send a response . Additionally, Retell sends messages with
interaction_type
as
update_only
when the AI is speaking, where you don't need to respond but can get the transcript from the JSON body . For handling user interruptions during response generation, a community discussion suggests that if you're in the middle of generating a response and the user interrupts, you can drop the current response being generated and generate a new response, though these implementations can be quite tricky and require careful thinking [(2) ]() . The documentation also mentions new ping pong events and reconnection mechanisms in the LLM websocket that track server roundtrip latency [(3) ]() . However, I don't have specific documentation about detecting whether a message is the final update for a turn or detailed configuration options to prevent multiple
response_required
messages in the same turn. For this specific issue, I recommend checking the [LLM WebSocket API documentation]() for detailed event handling specifications, or reaching out to Retell support for guidance on managing multiple response requests within a single turn.