Browse Source

fix: CountTokenInput

CaIon 1 year ago
parent
commit
6114c9bb96
1 changed files with 1 additions and 1 deletions
  1. 1 1
      service/token_counter.go

+ 1 - 1
service/token_counter.go

@@ -208,7 +208,7 @@ func CountTokenInput(input any, model string, check bool) (int, error, bool) {
 		}
 		}
 		return CountTokenText(text, model, check)
 		return CountTokenText(text, model, check)
 	}
 	}
-	return 0, nil, false
+	return CountTokenInput(fmt.Sprintf("%v", input), model, check)
 }
 }
 
 
 func CountAudioToken(text string, model string, check bool) (int, error, bool) {
 func CountAudioToken(text string, model string, check bool) (int, error, bool) {