@vapi-ai/web 1.0.255 → 1.0.256

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -33,7 +33,10 @@ vapi.start({
33
33
  model: "gpt-3.5-turbo",
34
34
  systemPrompt: "You're an assistant..."
35
35
  },
36
- voice: "jennifer-playht",
36
+ voice: {
37
+ provider: "11labs",
38
+ voiceId: "burt",
39
+ },
37
40
  ...
38
41
  });
39
42
  ```
@@ -43,6 +46,21 @@ vapi.start('your-assistant-id');
43
46
 
44
47
  The `start` method will initiate a new call.
45
48
 
49
+ You can also send text messages to the assistant aside from the audio input using the `send` method and passing appropriate `role` and `content`.
50
+
51
+ ```javascript
52
+ vapi.send({
53
+ type: "add-message",
54
+ message: {
55
+ role: "system",
56
+ content: "The user has pressed the button, say peanuts",
57
+ },
58
+ });
59
+
60
+ ```
61
+
62
+ Possible values for the role are `system`, `user`, `assistant`, `tool` or `function`.
63
+
46
64
  You can stop the session by calling the `stop` method:
47
65
 
48
66
  ```javascript