切换到kvstore

This commit is contained in:
2026-04-10 13:44:54 +00:00
parent d4e6142131
commit 8d8130bbf0
4 changed files with 20 additions and 26 deletions

View File

@@ -157,6 +157,10 @@ func (a *app) countMessageTokens(role, content string) (int, error) {
return tokenizer.GetTokens(&message, a.openaiConf.Model)
}
func (a *app) buildZeroUsage() *proto.Usage {
return &proto.Usage{}
}
func (a *app) buildUsage(promptTokens int, answer string) (*proto.Usage, error) {
completionTokens := 0
if answer != "" {