@speakableio/core 1.0.46 → 1.0.49
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.native.d.mts +16 -2
- package/dist/index.native.d.ts +16 -2
- package/dist/index.native.js +34 -15
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +34 -15
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +16 -2
- package/dist/index.web.js +34 -15
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.mjs
CHANGED
|
@@ -1604,6 +1604,7 @@ var ActivityPageType = /* @__PURE__ */ ((ActivityPageType2) => {
|
|
|
1604
1604
|
ActivityPageType2["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
|
|
1605
1605
|
ActivityPageType2["MEDIA_PAGE"] = "MEDIA_PAGE";
|
|
1606
1606
|
ActivityPageType2["SHORT_ANSWER"] = "SHORT_ANSWER";
|
|
1607
|
+
ActivityPageType2["CONVERSATION"] = "CONVERSATION";
|
|
1607
1608
|
return ActivityPageType2;
|
|
1608
1609
|
})(ActivityPageType || {});
|
|
1609
1610
|
var RESPOND_PAGE_ACTIVITY_TYPES = [
|
|
@@ -1951,6 +1952,10 @@ var checkIsShortAnswerPage = (cardType) => {
|
|
|
1951
1952
|
if (cardType === void 0) return false;
|
|
1952
1953
|
return cardType === "SHORT_ANSWER" /* SHORT_ANSWER */;
|
|
1953
1954
|
};
|
|
1955
|
+
var checkIsConversationPage = (cardType) => {
|
|
1956
|
+
if (cardType === void 0) return false;
|
|
1957
|
+
return cardType === "CONVERSATION" /* CONVERSATION */;
|
|
1958
|
+
};
|
|
1954
1959
|
var checkTypePageActivity = (cardType) => {
|
|
1955
1960
|
const isRespondAudio = checkIsRespondAudioPage(cardType);
|
|
1956
1961
|
const isRespondWritten = checkIsRespondWrittenPage(cardType);
|
|
@@ -1959,7 +1964,8 @@ var checkTypePageActivity = (cardType) => {
|
|
|
1959
1964
|
const isRepeat = checkIsRepeatPage(cardType);
|
|
1960
1965
|
const isMediaPage = checkIsMediaPage(cardType);
|
|
1961
1966
|
const isShortAnswer = checkIsShortAnswerPage(cardType);
|
|
1962
|
-
const
|
|
1967
|
+
const isConversation = checkIsConversationPage(cardType);
|
|
1968
|
+
const isNoOneOfThem = !isRespond && !isMC && !isRepeat && !isMediaPage && !isShortAnswer && !isConversation;
|
|
1963
1969
|
if (isNoOneOfThem) {
|
|
1964
1970
|
return {
|
|
1965
1971
|
isRespondAudio: false,
|
|
@@ -1969,7 +1975,8 @@ var checkTypePageActivity = (cardType) => {
|
|
|
1969
1975
|
isRepeat: true,
|
|
1970
1976
|
isMediaPage: false,
|
|
1971
1977
|
isShortAnswer: false,
|
|
1972
|
-
hasSomeType: false
|
|
1978
|
+
hasSomeType: false,
|
|
1979
|
+
isConversation: false
|
|
1973
1980
|
};
|
|
1974
1981
|
}
|
|
1975
1982
|
return {
|
|
@@ -1980,7 +1987,8 @@ var checkTypePageActivity = (cardType) => {
|
|
|
1980
1987
|
isRepeat,
|
|
1981
1988
|
isMediaPage,
|
|
1982
1989
|
isShortAnswer,
|
|
1983
|
-
hasSomeType: true
|
|
1990
|
+
hasSomeType: true,
|
|
1991
|
+
isConversation
|
|
1984
1992
|
};
|
|
1985
1993
|
};
|
|
1986
1994
|
|
|
@@ -2180,24 +2188,34 @@ var createSetRepo = () => {
|
|
|
2180
2188
|
// src/utils/ai/detect-transcript-hallucionation.ts
|
|
2181
2189
|
var HALLUCINATION_THRESHOLDS = {
|
|
2182
2190
|
// Short repeats
|
|
2183
|
-
MIN_CONSECUTIVE_REPEATS:
|
|
2184
|
-
|
|
2191
|
+
MIN_CONSECUTIVE_REPEATS: 5,
|
|
2192
|
+
// Increased from 3 to allow phrases like "pio pio pio" or "no no no no"
|
|
2193
|
+
MIN_WORDS_FOR_RATIO_CHECK: 15,
|
|
2194
|
+
// Increased from 10 to require longer text for ratio check
|
|
2185
2195
|
MAX_UNIQUE_WORDS_FOR_RATIO: 3,
|
|
2186
|
-
MIN_REPETITION_RATIO:
|
|
2196
|
+
MIN_REPETITION_RATIO: 4,
|
|
2197
|
+
// Increased from 3 to be more permissive
|
|
2187
2198
|
// Phrase repeats
|
|
2188
|
-
MIN_SENTENCE_LENGTH:
|
|
2189
|
-
|
|
2190
|
-
|
|
2199
|
+
MIN_SENTENCE_LENGTH: 15,
|
|
2200
|
+
// Increased from 10 to avoid flagging short natural sentences
|
|
2201
|
+
MIN_CONSECUTIVE_SIMILAR_SENTENCES: 3,
|
|
2202
|
+
// Increased from 2 to allow some natural repetition
|
|
2203
|
+
MIN_SENTENCES_FOR_DUPLICATE_CHECK: 4,
|
|
2204
|
+
// Increased from 3
|
|
2191
2205
|
// Cyclic patterns
|
|
2192
|
-
MIN_CYCLE_LENGTH:
|
|
2206
|
+
MIN_CYCLE_LENGTH: 30,
|
|
2207
|
+
// Increased from 20 to focus on longer patterns
|
|
2193
2208
|
MIN_CYCLE_REPEATS: 3,
|
|
2194
2209
|
// Entropy detection
|
|
2195
|
-
MIN_LENGTH_FOR_ENTROPY_CHECK:
|
|
2196
|
-
|
|
2197
|
-
|
|
2210
|
+
MIN_LENGTH_FOR_ENTROPY_CHECK: 60,
|
|
2211
|
+
// Increased from 50
|
|
2212
|
+
MAX_ENTROPY_THRESHOLD: 2.2,
|
|
2213
|
+
// Decreased from 2.5 to be more strict on entropy (lower = more repetitive needed)
|
|
2198
2214
|
// Similarity
|
|
2199
|
-
SENTENCE_SIMILARITY_THRESHOLD: 0.
|
|
2200
|
-
|
|
2215
|
+
SENTENCE_SIMILARITY_THRESHOLD: 0.85,
|
|
2216
|
+
// Increased from 0.8 to require more similarity
|
|
2217
|
+
SEGMENT_SIMILARITY_THRESHOLD: 0.9
|
|
2218
|
+
// Increased from 0.85
|
|
2201
2219
|
};
|
|
2202
2220
|
function detectTranscriptHallucinationWithDetails(transcript) {
|
|
2203
2221
|
if (!transcript || transcript.trim().length === 0) {
|
|
@@ -3773,6 +3791,7 @@ export {
|
|
|
3773
3791
|
VerificationCardStatus,
|
|
3774
3792
|
assignmentQueryKeys,
|
|
3775
3793
|
cardsQueryKeys,
|
|
3794
|
+
checkIsConversationPage,
|
|
3776
3795
|
checkIsMCPage,
|
|
3777
3796
|
checkIsMediaPage,
|
|
3778
3797
|
checkIsRepeatPage,
|