can tools be used on the web sdk? I found this on the documentation, the role que be set to tool, how would i use it?
.send()
During the call, you can send intermediate messages to the assistant (like background messages).
type will always be "add-message"
the message field will have 2 items, role and content.
vapi.send({
type: "add-message",
message: {
role: "system",
content: "The user has pressed the button, say peanuts",
},
});
Possible values for role are system, user, assistant, tool or function.