feat: enhance file handling and logging in the application

This commit is contained in:
CaIon committed 2025-04-11 16:23:54 +08:00
1 parent 7e0d4cd055
commit 577b18a1a1
5 files changed
+82 -9

No files matched your search

+2
View File
@@ -398,6 +398,8 @@ func CountTokenMessages(info *relaycommon.RelayInfo, messages []dto.Message, mod
} else if m.Type == dto.ContentTypeInputAudio {
// TODO: 音频token数量计算
tokenNum += 100
} else if m.Type == dto.ContentTypeFile {
tokenNum += 5000
} else {
tokenNum += getTokenNum(tokenEncoder, m.Text)
}