Raoni
12/10/2024, 12:45 PMcurl -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:
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!"
}'
IVapi
12/10/2024, 12:48 PMVapi
12/10/2024, 12:48 PM.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:
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:
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.Vapi
12/10/2024, 12:50 PMVapi
12/10/2024, 12:50 PM