From 6114c9bb964317300c0daf6660fedbbcac7179ae Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Tue, 26 Mar 2024 18:49:53 +0800 Subject: [PATCH] fix: CountTokenInput --- service/token_counter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/token_counter.go b/service/token_counter.go index f2e7a03c..5255c80f 100644 --- a/service/token_counter.go +++ b/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 0, nil, false + return CountTokenInput(fmt.Sprintf("%v", input), model, check) } func CountAudioToken(text string, model string, check bool) (int, error, bool) {