Mohab
02/28/2025, 7:42 PMVapi Support Bot
02/28/2025, 7:44 PM.send()
Method**: You can modify the user's message directly in your code by appending the desired suffix before sending it. For example, if you want to add "think step by step" as a suffix, you can do it like this:
javascript
vapi.send({
type: "add-message",
message: {
role: "user",
content: "This is the user's message [think step by step]"
}
});
In this example, replace [think step by step]
with whatever suffix you want to add.
2. **Controlling Responses**: If you want to add the suffix without triggering an immediate response from the LLM, you can use the triggerResponseEnabled
flag set to false:
javascript
vapi.send({
type: 'add-message',
message: {
role: 'user',
content: "This is the user's message [think step by step]"
},
triggerResponseEnabled: false
});
This way, you can customize the user's message effectively before it reaches the LLM. If you have any more questions or need further assistance, feel free to ask! 😊
Sources:
- [Modifying User Messages in Vapi to Include a Specific Suffix](https://docs.vapi.ai/customization/custom-llm/fine-tuned-openai-models)
- [Vapi SDK Documentation](https://docs.vapi.ai/sdk/web)Mohab
02/28/2025, 7:47 PMVapi Support Bot
02/28/2025, 7:49 PMMohab
02/28/2025, 7:50 PMVapi Support Bot
02/28/2025, 7:50 PM.send()
Method**: You can modify the user's message directly in your code by appending the desired suffix before sending it. For example, if you want to add "think step by step" as a suffix, you can do it like this:
javascript
vapi.send({
type: "add-message",
message: {
role: "user",
content: "This is the user's message [think step by step]"
}
});
Just replace [think step by step]
with whatever suffix you want to add.
2. **Controlling Responses**: If you want to add the suffix without triggering an immediate response from the LLM, you can use the triggerResponseEnabled
flag set to false:
javascript
vapi.send({
type: 'add-message',
message: {
role: 'user',
content: "This is the user's message [think step by step]"
},
triggerResponseEnabled: false
});
This way, you can effectively customize the user's message before it reaches the LLM. If you have any more questions or need further assistance, feel free to ask! 😊
Sources:
- [Modifying User Messages in Vapi to Include a Specific Suffix](https://docs.vapi.ai/customization/custom-llm/fine-tuned-openai-models)
- [Vapi SDK Documentation](https://docs.vapi.ai/sdk/web)Mason | Building KOI
02/28/2025, 7:51 PMMohab
02/28/2025, 7:52 PMMason | Building KOI
02/28/2025, 7:56 PMMason | Building KOI
02/28/2025, 7:59 PMMason | Building KOI
02/28/2025, 7:59 PMMason | Building KOI
02/28/2025, 7:59 PMMohab
02/28/2025, 8:03 PMMason | Building KOI
02/28/2025, 8:58 PMMohab
02/28/2025, 9:00 PMKings Big
03/03/2025, 8:49 AMMohab
03/03/2025, 5:20 PMKings Big
03/06/2025, 2:25 PMnearLucid
03/10/2025, 6:04 AMMohab
03/10/2025, 9:18 PMmessages
object before senidng to the LLM