切换到kvstore
This commit is contained in:
@@ -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 != "" {
|
||||
|
||||
Reference in New Issue
Block a user