Question about "Live Cal Control" (maybe a feature...
# support
r
Hi, i have the question bellow regarding "injecting a message" with live call controll, https://docs.vapi.ai/calls/call-features I couldnt find anything related to this on the API docs or swagger I wonder if there is a way to "guide" the assistant a certain way by injecting a message but that message is ONLY for guiding the assistant in a certain way The "say" type seems to be ok, but i dont want the "message" to be said by the assistant, but just to guide it towards
Copy code
curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control' 
-H 'content-type: application/json' 
--data-raw '{
  "type": "say",
  "message": "Welcome to Vapi, this message was injected during the call."
}'
. something like this:
Copy code
curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control' 
-H 'content-type: application/json' 
--data-raw '{
  "type": "guidance",
  "message": "You are being way too formal. Cool down, cheer up and the the user a joke!"
}'
I
v
You can continue this conversation by mentioning me in the message.
@Raoni Hello! It sounds like you're looking for a way to provide guidance to the assistant without having that guidance spoken aloud during a call. While the "say" type command you mentioned indeed causes the assistant to speak the message, what you're looking for is akin to a background directive that informs the assistant's behavior without being vocalized. For this purpose, you can use the
.send()
method with a "add-message" type to inject a system-level message that guides the assistant. This message will not be spoken, but it will influence the assistant's responses or behavior. Here's how you can format your request:
Copy code
json
{
  "type": "add-message",
  "message": {
    "role": "system",
    "content": "The user has pressed the button, say peanuts"
  }
}
In your case, you can adjust the content to guide the assistant as needed. For example:
Copy code
json
{
  "type": "add-message",
  "message": {
    "role": "system",
    "content": "You are being way too formal. Cool down, cheer up and tell the user a joke!"
  }
}
Please note that the actual implementation of how the assistant interprets and acts on these system messages would depend on the assistant's programming and the capabilities of the VAPI platform. If you'd like to proceed with sending such a guidance message, please let me know the exact content you wish to send, and I can assist you with that.
@Raoni Sweet. Have a great day!
@Vapi Sweet. Have a great day!
2 Views