feat: enhance file handling and logging in the application

This commit is contained in:
CaIon
2025-04-11 16:23:54 +08:00
parent 8a2332074f
commit cca9c0479f
5 changed files with 82 additions and 9 deletions

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)
}