@absolutejs/voice 0.0.22-beta.23 → 0.0.22-beta.24
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/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7167,12 +7167,14 @@ var summarizeVoiceSessions = async (options = {}) => {
|
|
|
7167
7167
|
const providerErrors = {};
|
|
7168
7168
|
const providers = new Set;
|
|
7169
7169
|
let latestOutcome;
|
|
7170
|
+
let errorCount = 0;
|
|
7170
7171
|
for (const event of sorted) {
|
|
7171
7172
|
const provider = getString3(event.payload.provider);
|
|
7172
7173
|
if (provider) {
|
|
7173
7174
|
providers.add(provider);
|
|
7174
7175
|
}
|
|
7175
7176
|
if (event.type === "session.error" && (event.payload.providerStatus === "error" || typeof event.payload.error === "string")) {
|
|
7177
|
+
errorCount += 1;
|
|
7176
7178
|
increment2(providerErrors, provider ?? "unknown");
|
|
7177
7179
|
}
|
|
7178
7180
|
const outcome = getString3(event.payload.outcome);
|
|
@@ -7182,14 +7184,14 @@ var summarizeVoiceSessions = async (options = {}) => {
|
|
|
7182
7184
|
}
|
|
7183
7185
|
const item = {
|
|
7184
7186
|
endedAt: summary.endedAt,
|
|
7185
|
-
errorCount
|
|
7187
|
+
errorCount,
|
|
7186
7188
|
eventCount: summary.eventCount,
|
|
7187
7189
|
latestOutcome,
|
|
7188
7190
|
providerErrors,
|
|
7189
7191
|
providers: [...providers].sort(),
|
|
7190
7192
|
sessionId,
|
|
7191
7193
|
startedAt: summary.startedAt,
|
|
7192
|
-
status:
|
|
7194
|
+
status: errorCount > 0 ? "failed" : "healthy",
|
|
7193
7195
|
transcriptCount: summary.transcriptCount,
|
|
7194
7196
|
turnCount: summary.turnCount
|
|
7195
7197
|
};
|