mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-08-20 21:17:45 +08:00
feat: 知识库更新,优化批量语音转写 - 合并索引 - 增加会话级批量转写处理 - 补充语音转写回归测试
This commit is contained in:
@@ -21,6 +21,7 @@ const candidate = (
|
||||
endTime: 1_785_895_200_000 + index,
|
||||
timestamp: 1_785_895_200_000 + index,
|
||||
messageIds: [`message-${index}`],
|
||||
sourceKind: 'text',
|
||||
text: `第 ${index} 条去健身相关消息`,
|
||||
score: -index,
|
||||
...options
|
||||
@@ -64,6 +65,12 @@ describe('Final Evidence builder', () => {
|
||||
])
|
||||
})
|
||||
|
||||
it('preserves voice source type through Final Evidence', () => {
|
||||
const result = buildFinalEvidence([candidate(1, { sourceKind: 'voice' })], 8)
|
||||
|
||||
expect(result.evidence[0]).toMatchObject({ id: 'E1', sourceKind: 'voice' })
|
||||
})
|
||||
|
||||
it('removes citations which do not resolve to Final Evidence', () => {
|
||||
const evidence = buildFinalEvidence([candidate(1), candidate(2)], 8).evidence
|
||||
const result = sanitizeAnswerCitations('杨伟提到健身。[E1] 另有无效来源。[E10][E23]', evidence)
|
||||
|
||||
Reference in New Issue
Block a user