Tripp (Summit)
08/16/2024, 7:32 PMconversation-update
server messages have malformed conversation messages.
While the user or system is speaking, the webhook events incorrectly associate the current message with the previous role's message, delineated by \n\n
Here is a simplified example of what we are seeing
First event:
{"messages":[{"role":"assistant","content":"Hello, Tripp. How are you today?"}]}
Second event:
{"messages":[{"role":"assistant","content":"Hello, Tripp. How are you today?"},{"role":"user","content":"Hey, coach. I'm doing pretty well. How are you?"}]}
Third event (MALFORMED):
{"messages":[{"role":"assistant","content":"Hello, Tripp. How are you today?\n\nI'm doing great. Thanks for asking."},{"role":"user","content":"Hey, coach. I'm doing pretty well. How are you?"}]}
Final event
{"messages":[{"role":"assistant","content":"Hello, Tripp. How are you today?"},{"role":"user","content":"Hey, coach. I'm doing pretty well. How are you?"}, {"role":"assistant","content":"I'm doing great. Thanks for asking. How are your goals coming along?"]}
We recently switched to a custom-llm server. Any idea what might be causing this?Vapi
08/16/2024, 7:34 PMconversation-update
server messages. It seems like there might be a problem with how the conversation state is being managed or updated, especially since you've mentioned switching to a custom-llm server.
To address this issue, I would recommend checking the following:
1. **Integration with the custom-llm server**: Ensure that the integration is correctly handling the state of the conversation and that the messages are being processed in the correct order.
2. **Webhook Event Handling**: Verify that the logic which handles the webhook events is correctly appending new messages to the conversation without altering the previous ones.
3. **Server Configuration**: Review the configuration of your custom-llm server to ensure it's not causing the conversation messages to be malformed.
4. **Message Processing Logic**: Check the logic that processes and sends the conversation-update
messages to ensure it's correctly separating the messages by role and not merging them incorrectly.
If you need further assistance in troubleshooting this issue, please provide more details about your current setup or any recent changes that might have affected the message formatting. Meanwhile, if there's anything else I can do to help you resolve this issue, please let me know.Vapi
08/16/2024, 7:34 PMSahil
08/17/2024, 11:25 AM