@vapi-ai/web 1.1.4 → 1.1.6
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/api.ts +4 -0
- package/dist/api.d.ts +2 -2
- package/dist/vapi.js +3 -0
- package/package.json +1 -1
- package/vapi.ts +4 -0
package/api.ts
CHANGED
|
@@ -772,6 +772,8 @@ export interface OpenAIModel {
|
|
|
772
772
|
provider: 'openai';
|
|
773
773
|
/** This is the OpenAI model that will be used. */
|
|
774
774
|
model:
|
|
775
|
+
| 'gpt-4o'
|
|
776
|
+
| 'gpt-4o-2024-05-13'
|
|
775
777
|
| 'gpt-4-turbo'
|
|
776
778
|
| 'gpt-4-turbo-2024-04-09'
|
|
777
779
|
| 'gpt-4-turbo-preview'
|
|
@@ -789,6 +791,8 @@ export interface OpenAIModel {
|
|
|
789
791
|
* @example ["gpt-4-0125-preview","gpt-4-0613"]
|
|
790
792
|
*/
|
|
791
793
|
fallbackModels?:
|
|
794
|
+
| 'gpt-4o'
|
|
795
|
+
| 'gpt-4o-2024-05-13'
|
|
792
796
|
| 'gpt-4-turbo'
|
|
793
797
|
| 'gpt-4-turbo-2024-04-09'
|
|
794
798
|
| 'gpt-4-turbo-preview'
|
package/dist/api.d.ts
CHANGED
|
@@ -503,12 +503,12 @@ export interface OpenAIModel {
|
|
|
503
503
|
/** This is the provider that will be used for the model. */
|
|
504
504
|
provider: 'openai';
|
|
505
505
|
/** This is the OpenAI model that will be used. */
|
|
506
|
-
model: 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4' | 'gpt-4-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0613';
|
|
506
|
+
model: 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4' | 'gpt-4-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0613';
|
|
507
507
|
/**
|
|
508
508
|
* These are the fallback models that will be used if the primary model fails. This shouldn't be specified unless you have a specific reason to do so. Vapi will automatically find the fastest fallbacks that make sense.
|
|
509
509
|
* @example ["gpt-4-0125-preview","gpt-4-0613"]
|
|
510
510
|
*/
|
|
511
|
-
fallbackModels?: 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4' | 'gpt-4-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0613';
|
|
511
|
+
fallbackModels?: 'gpt-4o' | 'gpt-4o-2024-05-13' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-turbo-preview' | 'gpt-4-0125-preview' | 'gpt-4-1106-preview' | 'gpt-4' | 'gpt-4-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0613';
|
|
512
512
|
/** @example true */
|
|
513
513
|
semanticCachingEnabled?: boolean;
|
|
514
514
|
/**
|
package/dist/vapi.js
CHANGED
|
@@ -103,6 +103,9 @@ class Vapi extends VapiEventEmitter {
|
|
|
103
103
|
this.call.on('error', (error) => {
|
|
104
104
|
this.emit('error', error);
|
|
105
105
|
});
|
|
106
|
+
this.call.on('camera-error', (error) => {
|
|
107
|
+
this.emit('error', error);
|
|
108
|
+
});
|
|
106
109
|
this.call.on('track-started', async (e) => {
|
|
107
110
|
if (!e || !e.participant)
|
|
108
111
|
return;
|
package/package.json
CHANGED
package/vapi.ts
CHANGED
|
@@ -154,6 +154,10 @@ export default class Vapi extends VapiEventEmitter {
|
|
|
154
154
|
this.emit('error', error);
|
|
155
155
|
});
|
|
156
156
|
|
|
157
|
+
this.call.on('camera-error', (error: any) => {
|
|
158
|
+
this.emit('error', error);
|
|
159
|
+
});
|
|
160
|
+
|
|
157
161
|
this.call.on('track-started', async (e) => {
|
|
158
162
|
if (!e || !e.participant) return;
|
|
159
163
|
if (e.participant?.local) return;
|