@speakableio/core 1.0.45 → 1.0.48
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 +33 -0
- package/dist/index.native.d.ts +33 -0
- package/dist/index.native.js +22 -12
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +22 -12
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +33 -0
- package/dist/index.web.js +22 -12
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.d.mts
CHANGED
|
@@ -118,6 +118,7 @@ interface PageActivity {
|
|
|
118
118
|
target_text?: string;
|
|
119
119
|
type: ActivityPageType;
|
|
120
120
|
grading_criteria?: string;
|
|
121
|
+
grading_criteria_title?: string;
|
|
121
122
|
scoring_type?: string;
|
|
122
123
|
grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based';
|
|
123
124
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -160,6 +161,8 @@ interface PageActivity {
|
|
|
160
161
|
rich_text?: string;
|
|
161
162
|
feedbackOff?: boolean;
|
|
162
163
|
correct_answer_exact_match?: boolean;
|
|
164
|
+
ai_context_block_ids?: string[];
|
|
165
|
+
resolvedContext?: string;
|
|
163
166
|
}
|
|
164
167
|
declare const enum ActivityPageType {
|
|
165
168
|
READ_REPEAT = "READ_REPEAT",
|
|
@@ -218,6 +221,7 @@ declare function useCards({ cardIds, enabled, asObject, }: {
|
|
|
218
221
|
default_language?: string;
|
|
219
222
|
target_text?: string;
|
|
220
223
|
grading_criteria?: string;
|
|
224
|
+
grading_criteria_title?: string;
|
|
221
225
|
scoring_type?: string;
|
|
222
226
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
223
227
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -260,6 +264,8 @@ declare function useCards({ cardIds, enabled, asObject, }: {
|
|
|
260
264
|
rich_text?: string;
|
|
261
265
|
feedbackOff?: boolean;
|
|
262
266
|
correct_answer_exact_match?: boolean;
|
|
267
|
+
ai_context_block_ids?: string[];
|
|
268
|
+
resolvedContext?: string;
|
|
263
269
|
} | null, Error>[];
|
|
264
270
|
};
|
|
265
271
|
declare function useCreateCard(): {
|
|
@@ -297,6 +303,7 @@ declare function useCreateCards(): {
|
|
|
297
303
|
target_text?: string;
|
|
298
304
|
type: ActivityPageType;
|
|
299
305
|
grading_criteria?: string;
|
|
306
|
+
grading_criteria_title?: string;
|
|
300
307
|
scoring_type?: string;
|
|
301
308
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
302
309
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -339,6 +346,8 @@ declare function useCreateCards(): {
|
|
|
339
346
|
rich_text?: string;
|
|
340
347
|
feedbackOff?: boolean;
|
|
341
348
|
correct_answer_exact_match?: boolean;
|
|
349
|
+
ai_context_block_ids?: string[];
|
|
350
|
+
resolvedContext?: string;
|
|
342
351
|
}[], Error, {
|
|
343
352
|
cards: PageActivity[];
|
|
344
353
|
}, unknown>;
|
|
@@ -382,6 +391,7 @@ declare function useGetCard({ cardId, enabled }: {
|
|
|
382
391
|
default_language?: string;
|
|
383
392
|
target_text?: string;
|
|
384
393
|
grading_criteria?: string;
|
|
394
|
+
grading_criteria_title?: string;
|
|
385
395
|
scoring_type?: string;
|
|
386
396
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
387
397
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -424,6 +434,8 @@ declare function useGetCard({ cardId, enabled }: {
|
|
|
424
434
|
rich_text?: string;
|
|
425
435
|
feedbackOff?: boolean;
|
|
426
436
|
correct_answer_exact_match?: boolean;
|
|
437
|
+
ai_context_block_ids?: string[];
|
|
438
|
+
resolvedContext?: string;
|
|
427
439
|
} | null, Error>;
|
|
428
440
|
|
|
429
441
|
declare const createCardRepo: () => {
|
|
@@ -461,6 +473,7 @@ declare const createCardRepo: () => {
|
|
|
461
473
|
target_text?: string;
|
|
462
474
|
type: ActivityPageType;
|
|
463
475
|
grading_criteria?: string;
|
|
476
|
+
grading_criteria_title?: string;
|
|
464
477
|
scoring_type?: string;
|
|
465
478
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
466
479
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -503,6 +516,8 @@ declare const createCardRepo: () => {
|
|
|
503
516
|
rich_text?: string;
|
|
504
517
|
feedbackOff?: boolean;
|
|
505
518
|
correct_answer_exact_match?: boolean;
|
|
519
|
+
ai_context_block_ids?: string[];
|
|
520
|
+
resolvedContext?: string;
|
|
506
521
|
}[]>;
|
|
507
522
|
getCard: (params: {
|
|
508
523
|
cardId: string;
|
|
@@ -533,6 +548,7 @@ declare const createCardRepo: () => {
|
|
|
533
548
|
default_language?: string;
|
|
534
549
|
target_text?: string;
|
|
535
550
|
grading_criteria?: string;
|
|
551
|
+
grading_criteria_title?: string;
|
|
536
552
|
scoring_type?: string;
|
|
537
553
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
538
554
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -575,6 +591,8 @@ declare const createCardRepo: () => {
|
|
|
575
591
|
rich_text?: string;
|
|
576
592
|
feedbackOff?: boolean;
|
|
577
593
|
correct_answer_exact_match?: boolean;
|
|
594
|
+
ai_context_block_ids?: string[];
|
|
595
|
+
resolvedContext?: string;
|
|
578
596
|
} | null>;
|
|
579
597
|
};
|
|
580
598
|
|
|
@@ -1388,6 +1406,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1388
1406
|
target_text?: string;
|
|
1389
1407
|
type: ActivityPageType;
|
|
1390
1408
|
grading_criteria?: string;
|
|
1409
|
+
grading_criteria_title?: string;
|
|
1391
1410
|
scoring_type?: string;
|
|
1392
1411
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1393
1412
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -1430,6 +1449,8 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1430
1449
|
rich_text?: string;
|
|
1431
1450
|
feedbackOff?: boolean;
|
|
1432
1451
|
correct_answer_exact_match?: boolean;
|
|
1452
|
+
ai_context_block_ids?: string[];
|
|
1453
|
+
resolvedContext?: string;
|
|
1433
1454
|
}[]>;
|
|
1434
1455
|
getCard: (params: {
|
|
1435
1456
|
cardId: string;
|
|
@@ -1460,6 +1481,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1460
1481
|
default_language?: string;
|
|
1461
1482
|
target_text?: string;
|
|
1462
1483
|
grading_criteria?: string;
|
|
1484
|
+
grading_criteria_title?: string;
|
|
1463
1485
|
scoring_type?: string;
|
|
1464
1486
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1465
1487
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -1502,6 +1524,8 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1502
1524
|
rich_text?: string;
|
|
1503
1525
|
feedbackOff?: boolean;
|
|
1504
1526
|
correct_answer_exact_match?: boolean;
|
|
1527
|
+
ai_context_block_ids?: string[];
|
|
1528
|
+
resolvedContext?: string;
|
|
1505
1529
|
} | null>;
|
|
1506
1530
|
};
|
|
1507
1531
|
};
|
|
@@ -1716,6 +1740,7 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
|
|
|
1716
1740
|
default_language?: string;
|
|
1717
1741
|
target_text?: string;
|
|
1718
1742
|
grading_criteria?: string;
|
|
1743
|
+
grading_criteria_title?: string;
|
|
1719
1744
|
scoring_type?: string;
|
|
1720
1745
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1721
1746
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -1758,6 +1783,8 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
|
|
|
1758
1783
|
rich_text?: string;
|
|
1759
1784
|
feedbackOff?: boolean;
|
|
1760
1785
|
correct_answer_exact_match?: boolean;
|
|
1786
|
+
ai_context_block_ids?: string[];
|
|
1787
|
+
resolvedContext?: string;
|
|
1761
1788
|
} | null, Error>[];
|
|
1762
1789
|
cardsArray: PageActivityWithId[];
|
|
1763
1790
|
};
|
|
@@ -3261,6 +3288,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3261
3288
|
target_text?: string;
|
|
3262
3289
|
type: ActivityPageType;
|
|
3263
3290
|
grading_criteria?: string;
|
|
3291
|
+
grading_criteria_title?: string;
|
|
3264
3292
|
scoring_type?: string;
|
|
3265
3293
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
3266
3294
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -3303,6 +3331,8 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3303
3331
|
rich_text?: string;
|
|
3304
3332
|
feedbackOff?: boolean;
|
|
3305
3333
|
correct_answer_exact_match?: boolean;
|
|
3334
|
+
ai_context_block_ids?: string[];
|
|
3335
|
+
resolvedContext?: string;
|
|
3306
3336
|
}[]>;
|
|
3307
3337
|
getCard: (params: {
|
|
3308
3338
|
cardId: string;
|
|
@@ -3333,6 +3363,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3333
3363
|
default_language?: string;
|
|
3334
3364
|
target_text?: string;
|
|
3335
3365
|
grading_criteria?: string;
|
|
3366
|
+
grading_criteria_title?: string;
|
|
3336
3367
|
scoring_type?: string;
|
|
3337
3368
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
3338
3369
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -3375,6 +3406,8 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3375
3406
|
rich_text?: string;
|
|
3376
3407
|
feedbackOff?: boolean;
|
|
3377
3408
|
correct_answer_exact_match?: boolean;
|
|
3409
|
+
ai_context_block_ids?: string[];
|
|
3410
|
+
resolvedContext?: string;
|
|
3378
3411
|
} | null>;
|
|
3379
3412
|
};
|
|
3380
3413
|
};
|
package/dist/index.native.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ interface PageActivity {
|
|
|
118
118
|
target_text?: string;
|
|
119
119
|
type: ActivityPageType;
|
|
120
120
|
grading_criteria?: string;
|
|
121
|
+
grading_criteria_title?: string;
|
|
121
122
|
scoring_type?: string;
|
|
122
123
|
grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based';
|
|
123
124
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -160,6 +161,8 @@ interface PageActivity {
|
|
|
160
161
|
rich_text?: string;
|
|
161
162
|
feedbackOff?: boolean;
|
|
162
163
|
correct_answer_exact_match?: boolean;
|
|
164
|
+
ai_context_block_ids?: string[];
|
|
165
|
+
resolvedContext?: string;
|
|
163
166
|
}
|
|
164
167
|
declare const enum ActivityPageType {
|
|
165
168
|
READ_REPEAT = "READ_REPEAT",
|
|
@@ -218,6 +221,7 @@ declare function useCards({ cardIds, enabled, asObject, }: {
|
|
|
218
221
|
default_language?: string;
|
|
219
222
|
target_text?: string;
|
|
220
223
|
grading_criteria?: string;
|
|
224
|
+
grading_criteria_title?: string;
|
|
221
225
|
scoring_type?: string;
|
|
222
226
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
223
227
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -260,6 +264,8 @@ declare function useCards({ cardIds, enabled, asObject, }: {
|
|
|
260
264
|
rich_text?: string;
|
|
261
265
|
feedbackOff?: boolean;
|
|
262
266
|
correct_answer_exact_match?: boolean;
|
|
267
|
+
ai_context_block_ids?: string[];
|
|
268
|
+
resolvedContext?: string;
|
|
263
269
|
} | null, Error>[];
|
|
264
270
|
};
|
|
265
271
|
declare function useCreateCard(): {
|
|
@@ -297,6 +303,7 @@ declare function useCreateCards(): {
|
|
|
297
303
|
target_text?: string;
|
|
298
304
|
type: ActivityPageType;
|
|
299
305
|
grading_criteria?: string;
|
|
306
|
+
grading_criteria_title?: string;
|
|
300
307
|
scoring_type?: string;
|
|
301
308
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
302
309
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -339,6 +346,8 @@ declare function useCreateCards(): {
|
|
|
339
346
|
rich_text?: string;
|
|
340
347
|
feedbackOff?: boolean;
|
|
341
348
|
correct_answer_exact_match?: boolean;
|
|
349
|
+
ai_context_block_ids?: string[];
|
|
350
|
+
resolvedContext?: string;
|
|
342
351
|
}[], Error, {
|
|
343
352
|
cards: PageActivity[];
|
|
344
353
|
}, unknown>;
|
|
@@ -382,6 +391,7 @@ declare function useGetCard({ cardId, enabled }: {
|
|
|
382
391
|
default_language?: string;
|
|
383
392
|
target_text?: string;
|
|
384
393
|
grading_criteria?: string;
|
|
394
|
+
grading_criteria_title?: string;
|
|
385
395
|
scoring_type?: string;
|
|
386
396
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
387
397
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -424,6 +434,8 @@ declare function useGetCard({ cardId, enabled }: {
|
|
|
424
434
|
rich_text?: string;
|
|
425
435
|
feedbackOff?: boolean;
|
|
426
436
|
correct_answer_exact_match?: boolean;
|
|
437
|
+
ai_context_block_ids?: string[];
|
|
438
|
+
resolvedContext?: string;
|
|
427
439
|
} | null, Error>;
|
|
428
440
|
|
|
429
441
|
declare const createCardRepo: () => {
|
|
@@ -461,6 +473,7 @@ declare const createCardRepo: () => {
|
|
|
461
473
|
target_text?: string;
|
|
462
474
|
type: ActivityPageType;
|
|
463
475
|
grading_criteria?: string;
|
|
476
|
+
grading_criteria_title?: string;
|
|
464
477
|
scoring_type?: string;
|
|
465
478
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
466
479
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -503,6 +516,8 @@ declare const createCardRepo: () => {
|
|
|
503
516
|
rich_text?: string;
|
|
504
517
|
feedbackOff?: boolean;
|
|
505
518
|
correct_answer_exact_match?: boolean;
|
|
519
|
+
ai_context_block_ids?: string[];
|
|
520
|
+
resolvedContext?: string;
|
|
506
521
|
}[]>;
|
|
507
522
|
getCard: (params: {
|
|
508
523
|
cardId: string;
|
|
@@ -533,6 +548,7 @@ declare const createCardRepo: () => {
|
|
|
533
548
|
default_language?: string;
|
|
534
549
|
target_text?: string;
|
|
535
550
|
grading_criteria?: string;
|
|
551
|
+
grading_criteria_title?: string;
|
|
536
552
|
scoring_type?: string;
|
|
537
553
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
538
554
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -575,6 +591,8 @@ declare const createCardRepo: () => {
|
|
|
575
591
|
rich_text?: string;
|
|
576
592
|
feedbackOff?: boolean;
|
|
577
593
|
correct_answer_exact_match?: boolean;
|
|
594
|
+
ai_context_block_ids?: string[];
|
|
595
|
+
resolvedContext?: string;
|
|
578
596
|
} | null>;
|
|
579
597
|
};
|
|
580
598
|
|
|
@@ -1388,6 +1406,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1388
1406
|
target_text?: string;
|
|
1389
1407
|
type: ActivityPageType;
|
|
1390
1408
|
grading_criteria?: string;
|
|
1409
|
+
grading_criteria_title?: string;
|
|
1391
1410
|
scoring_type?: string;
|
|
1392
1411
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1393
1412
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -1430,6 +1449,8 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1430
1449
|
rich_text?: string;
|
|
1431
1450
|
feedbackOff?: boolean;
|
|
1432
1451
|
correct_answer_exact_match?: boolean;
|
|
1452
|
+
ai_context_block_ids?: string[];
|
|
1453
|
+
resolvedContext?: string;
|
|
1433
1454
|
}[]>;
|
|
1434
1455
|
getCard: (params: {
|
|
1435
1456
|
cardId: string;
|
|
@@ -1460,6 +1481,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1460
1481
|
default_language?: string;
|
|
1461
1482
|
target_text?: string;
|
|
1462
1483
|
grading_criteria?: string;
|
|
1484
|
+
grading_criteria_title?: string;
|
|
1463
1485
|
scoring_type?: string;
|
|
1464
1486
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1465
1487
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -1502,6 +1524,8 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1502
1524
|
rich_text?: string;
|
|
1503
1525
|
feedbackOff?: boolean;
|
|
1504
1526
|
correct_answer_exact_match?: boolean;
|
|
1527
|
+
ai_context_block_ids?: string[];
|
|
1528
|
+
resolvedContext?: string;
|
|
1505
1529
|
} | null>;
|
|
1506
1530
|
};
|
|
1507
1531
|
};
|
|
@@ -1716,6 +1740,7 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
|
|
|
1716
1740
|
default_language?: string;
|
|
1717
1741
|
target_text?: string;
|
|
1718
1742
|
grading_criteria?: string;
|
|
1743
|
+
grading_criteria_title?: string;
|
|
1719
1744
|
scoring_type?: string;
|
|
1720
1745
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1721
1746
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -1758,6 +1783,8 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
|
|
|
1758
1783
|
rich_text?: string;
|
|
1759
1784
|
feedbackOff?: boolean;
|
|
1760
1785
|
correct_answer_exact_match?: boolean;
|
|
1786
|
+
ai_context_block_ids?: string[];
|
|
1787
|
+
resolvedContext?: string;
|
|
1761
1788
|
} | null, Error>[];
|
|
1762
1789
|
cardsArray: PageActivityWithId[];
|
|
1763
1790
|
};
|
|
@@ -3261,6 +3288,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3261
3288
|
target_text?: string;
|
|
3262
3289
|
type: ActivityPageType;
|
|
3263
3290
|
grading_criteria?: string;
|
|
3291
|
+
grading_criteria_title?: string;
|
|
3264
3292
|
scoring_type?: string;
|
|
3265
3293
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
3266
3294
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -3303,6 +3331,8 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3303
3331
|
rich_text?: string;
|
|
3304
3332
|
feedbackOff?: boolean;
|
|
3305
3333
|
correct_answer_exact_match?: boolean;
|
|
3334
|
+
ai_context_block_ids?: string[];
|
|
3335
|
+
resolvedContext?: string;
|
|
3306
3336
|
}[]>;
|
|
3307
3337
|
getCard: (params: {
|
|
3308
3338
|
cardId: string;
|
|
@@ -3333,6 +3363,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3333
3363
|
default_language?: string;
|
|
3334
3364
|
target_text?: string;
|
|
3335
3365
|
grading_criteria?: string;
|
|
3366
|
+
grading_criteria_title?: string;
|
|
3336
3367
|
scoring_type?: string;
|
|
3337
3368
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
3338
3369
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -3375,6 +3406,8 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3375
3406
|
rich_text?: string;
|
|
3376
3407
|
feedbackOff?: boolean;
|
|
3377
3408
|
correct_answer_exact_match?: boolean;
|
|
3409
|
+
ai_context_block_ids?: string[];
|
|
3410
|
+
resolvedContext?: string;
|
|
3378
3411
|
} | null>;
|
|
3379
3412
|
};
|
|
3380
3413
|
};
|
package/dist/index.native.js
CHANGED
|
@@ -2292,24 +2292,34 @@ var createSetRepo = () => {
|
|
|
2292
2292
|
// src/utils/ai/detect-transcript-hallucionation.ts
|
|
2293
2293
|
var HALLUCINATION_THRESHOLDS = {
|
|
2294
2294
|
// Short repeats
|
|
2295
|
-
MIN_CONSECUTIVE_REPEATS:
|
|
2296
|
-
|
|
2295
|
+
MIN_CONSECUTIVE_REPEATS: 5,
|
|
2296
|
+
// Increased from 3 to allow phrases like "pio pio pio" or "no no no no"
|
|
2297
|
+
MIN_WORDS_FOR_RATIO_CHECK: 15,
|
|
2298
|
+
// Increased from 10 to require longer text for ratio check
|
|
2297
2299
|
MAX_UNIQUE_WORDS_FOR_RATIO: 3,
|
|
2298
|
-
MIN_REPETITION_RATIO:
|
|
2300
|
+
MIN_REPETITION_RATIO: 4,
|
|
2301
|
+
// Increased from 3 to be more permissive
|
|
2299
2302
|
// Phrase repeats
|
|
2300
|
-
MIN_SENTENCE_LENGTH:
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
+
MIN_SENTENCE_LENGTH: 15,
|
|
2304
|
+
// Increased from 10 to avoid flagging short natural sentences
|
|
2305
|
+
MIN_CONSECUTIVE_SIMILAR_SENTENCES: 3,
|
|
2306
|
+
// Increased from 2 to allow some natural repetition
|
|
2307
|
+
MIN_SENTENCES_FOR_DUPLICATE_CHECK: 4,
|
|
2308
|
+
// Increased from 3
|
|
2303
2309
|
// Cyclic patterns
|
|
2304
|
-
MIN_CYCLE_LENGTH:
|
|
2310
|
+
MIN_CYCLE_LENGTH: 30,
|
|
2311
|
+
// Increased from 20 to focus on longer patterns
|
|
2305
2312
|
MIN_CYCLE_REPEATS: 3,
|
|
2306
2313
|
// Entropy detection
|
|
2307
|
-
MIN_LENGTH_FOR_ENTROPY_CHECK:
|
|
2308
|
-
|
|
2309
|
-
|
|
2314
|
+
MIN_LENGTH_FOR_ENTROPY_CHECK: 60,
|
|
2315
|
+
// Increased from 50
|
|
2316
|
+
MAX_ENTROPY_THRESHOLD: 2.2,
|
|
2317
|
+
// Decreased from 2.5 to be more strict on entropy (lower = more repetitive needed)
|
|
2310
2318
|
// Similarity
|
|
2311
|
-
SENTENCE_SIMILARITY_THRESHOLD: 0.
|
|
2312
|
-
|
|
2319
|
+
SENTENCE_SIMILARITY_THRESHOLD: 0.85,
|
|
2320
|
+
// Increased from 0.8 to require more similarity
|
|
2321
|
+
SEGMENT_SIMILARITY_THRESHOLD: 0.9
|
|
2322
|
+
// Increased from 0.85
|
|
2313
2323
|
};
|
|
2314
2324
|
function detectTranscriptHallucinationWithDetails(transcript) {
|
|
2315
2325
|
if (!transcript || transcript.trim().length === 0) {
|