@jambonz/time-series 0.2.19 → 0.2.21
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/index.js +29 -16
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const AlertType = {
|
|
|
22
22
|
ACCOUNT_INACTIVE: 'account is inactive or suspended',
|
|
23
23
|
PLAY_FILENOTFOUND: 'play-url-notfound',
|
|
24
24
|
TTS_STREAMING_CONNECTION_FAILURE: 'tts-streaming-connection-failure',
|
|
25
|
+
KRISP_NOT_PROVISIONED: 'no-krisp',
|
|
25
26
|
APPLICATION: 'alert-from-application'
|
|
26
27
|
};
|
|
27
28
|
|
|
@@ -667,28 +668,40 @@ const writeAlerts = async(client, alerts) => {
|
|
|
667
668
|
case AlertType.INVALID_APP_PAYLOAD:
|
|
668
669
|
message = `${url} return invalid app payload`;
|
|
669
670
|
break;
|
|
670
|
-
case AlertType.TTS_NOT_PROVISIONED:
|
|
671
|
-
|
|
671
|
+
case AlertType.TTS_NOT_PROVISIONED: {
|
|
672
|
+
const v = label ? `${vendor} (label: ${label})` : vendor;
|
|
673
|
+
message = `text to speech credentials for ${v} have not been provisioned`;
|
|
672
674
|
break;
|
|
673
|
-
|
|
674
|
-
|
|
675
|
+
}
|
|
676
|
+
case AlertType.STT_NOT_PROVISIONED: {
|
|
677
|
+
const v = label ? `${vendor} (label: ${label})` : vendor;
|
|
678
|
+
message = `speech to text credentials for ${v} have not been provisioned`;
|
|
675
679
|
break;
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
680
|
+
}
|
|
681
|
+
case AlertType.TTS_FAILURE: {
|
|
682
|
+
const v = label ? `${vendor} (label: ${label})` : vendor;
|
|
683
|
+
message = `text to speech request to ${v} failed${detail ? `: ${detail}` : ''}`;
|
|
679
684
|
break;
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
685
|
+
}
|
|
686
|
+
case AlertType.STT_FAILURE: {
|
|
687
|
+
const v = label ? `${vendor} (label: ${label})` : vendor;
|
|
688
|
+
message = `speech to text request to ${v} failed${detail ? `: ${detail}` : ''}`;
|
|
683
689
|
break;
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
690
|
+
}
|
|
691
|
+
case AlertType.LLM_NOT_PROVISIONED: {
|
|
692
|
+
const v = label ? `${vendor} (label: ${label})` : vendor;
|
|
693
|
+
message = `large language model credentials for ${v} have not been provisioned`;
|
|
687
694
|
break;
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
695
|
+
}
|
|
696
|
+
case AlertType.LLM_FAILURE: {
|
|
697
|
+
const v = label ? `${vendor} (label: ${label})` : vendor;
|
|
698
|
+
// Include the vendor's own error text (passed via `detail`) rather
|
|
699
|
+
// than the misleading "check your credentials" phrasing — most
|
|
700
|
+
// LLM failures are not credential issues (model not in region,
|
|
701
|
+
// rate limit, transient vendor 500, etc.).
|
|
702
|
+
message = `large language model request to ${v} failed${detail ? `: ${detail}` : ''}`;
|
|
691
703
|
break;
|
|
704
|
+
}
|
|
692
705
|
case AlertType.CARRIER_NOT_PROVISIONED:
|
|
693
706
|
message = 'outbound call failure: no carriers have been provisioned';
|
|
694
707
|
break;
|