bug: vapi messages payload
# support
u
for this call https://dashboard.vapi.ai/calls/f1d574c7-0238-4a94-aba2-494c07f75e30 vapi mistakenly combined user messages and AI's messages 1st payload
Copy code
{
  "model": "custom-llm",
  "messages": [
    {
      "role": "system",
      "content": "You are an assistant."
    },
    {
      "role": "assistant",
      "content": "Hello. I'm Jennifer with the Lemon Law Office of the Consumer Law Group. Please know that this call is recorded for quality assurance. Am I speaking with Dinhjia Yu?"
    },
    {
      "role": "user",
      "content": "Yeah."
    },
    {
      "role": "assistant",
      "content": "Great. Understand you have a 20 22 vehicle you told us about in the form you completed. In order to make sure your vehicle qualifies for a lemon law case, I need to ask you a few simple questions regarding your vehicle. Do you have a few minutes to chat?"
    },
    {
      "role": "user",
      "content": "Yes."
    }
  ],
subsequent payload
Copy code
{
  "model": "custom-llm",
  "messages": [
    {
      "role": "system",
      "content": "You are an assistant."
    },
    {
      "role": "assistant",
      "content": "Hello. I'm Jennifer with the Lemon Law Office of the Consumer Law Group. Please know that this call is recorded for quality assurance. Am I speaking with Dinhjia Yu?"
    },
    {
      "role": "user",
      "content": "Yeah."
    },
    {
      "role": "assistant",
      "content": "Great. Understand you have a 20 22 vehicle you told us about in the form you completed. In order to make sure your vehicle qualifies for a lemon law case, I need to ask you a few simple questions regarding your vehicle. Do you have a few minutes to chat? Thank you. So you mentioned that your vehicle has been repaired once. Is that true?"
    },
    {
      "role": "user",
      "content": "Yeah. Uh, yes. Correct."
    }
  ],
😢
v
@8Ds I'm sorry to hear about the confusion with the combined messages. I'll make sure to pass this feedback along to our team so we can improve our service. In the meantime, is there anything else I can assist you with regarding the call or any other concerns you might have?
You can continue this conversation by mentioning me in the message.
u
ask for help
s
logs
šŸ”µ 21:45:56:242 Voice Input Formatted: "Great! We understand you have a twenty twenty two vehicle you told us about in the form you completed.", Original: "Great! We understand you have a twenty twenty two vehicle you told us about in the form you completed." šŸ”µ 21:45:56:256 Voice Input Formatted: "In order to make sure your vehicle qualifies for a lemon law case,", Original: "In order to make sure your vehicle qualifies for a lemon law case," šŸ”µ 21:45:56:257 Voice Input Formatted: "I need to ask you a few simple questions regarding your vehicle.", Original: "I need to ask you a few simple questions regarding your vehicle." šŸ”µ 21:45:56:260 Voice Input Formatted: " Do you have a few minutes to chat?", Original: " Do you have a few minutes to chat?" šŸ”µ 21:46:16:826 Voice Input Formatted: "Thank you! So, you mentioned that your vehicle has been repaired once,", Original: "Thank you! So, you mentioned that your vehicle has been repaired once," šŸ”µ 21:46:16:829 Voice Input Formatted: " is that true?", Original: " is that true?" šŸ”µ 21:46:26:234 Conversation Buffer Processing Transcript. (previous: 4, new: 5) Previous: { "role": "user", "message": "Yes.", "time": 1731707174826, "endTime": 1731707175326, "secondsFromStart": 32.65, "duration": 500 }. New: { "role": "user", "message": "Yeah.", "time": 1731707186996, "endTime": 1731707187436, "secondsFromStart": 44.82, "duration": 440 }
logs[continuning]
šŸ”µ 21:46:28:609 CustomLLMRequest Messages: [ { "role": "assistant", "content": "Hello. I'm Jennifer with the Lemon Law Office of the Consumer Law Group. Please know that this call is recorded for quality assurance. Am I speaking with Dinhjia Yu?" }, {"role": "user", "content": "Yeah."}, { "role": "assistant", "content": "Great. Understand you have a 20 22 vehicle you told us about in the form you completed. In order to make sure your vehicle qualifies for a lemon law case, I need to ask you a few simple questions regarding your vehicle. Do you have a few minutes to chat? Thank you. So you mentioned that your vehicle has been repaired once. Is that true?" }, { "role": "user", "content": "Yeah. Uh, yes. Correct." } ]
@8Ds according to our model the conversation was still in continuation as visible from the logs and it got appended into one message despite of being uttered in two sentences. There is nothing wrong, the conversation model analysed and found out the user is still speaking and later when
Correct
was voiced out it came to conlusion.
I don't see it's an bug or issue for now, because models will have some consistency.
@8Ds What I will do is take the callId and the feedback and share with the team works for you?
u
yes, please
i understand from the engineering perspective however, as a customer, this doesn't seem quite right cuz
yes.
has been sent to our backend, and our system will generate response based on the latest user message. During this period, it at least takes a few seconds for our AI to generate and for vapi to voice it back. Combining the two user message distorted the conversation flow. on the other hand, if conversation is still in continuation, then vapi shouldn't send a request to our backend to get the reply, if i understand your system status correctly. but again, please do raise it to the team appreciated!
d
@Shubham Bajaj @User Is there any way to control this from Vapi? We also use custom-llm, and sometimes two events arrive for the same phrase, which makes the agent's behavior unstable.
k
David, this ticket belongs to somebody else. For you to have your responses under SLA and maintain the ticket context, please create a new support ticket.