Unverified Commit 60ee98f5 authored by Jyong's avatar Jyong Committed by GitHub

zhipu embedding token method (#1976)

Co-authored-by: 's avatarjyong <jyong@dify.ai>
parent 5b24d712
......@@ -55,7 +55,7 @@ class ZhipuAITextEmbeddingModel(_CommonZhipuaiAI, TextEmbeddingModel):
total_num_tokens = 0
for text in texts:
total_num_tokens += len(_get_token_ids_default_method(text))
total_num_tokens += self._get_num_tokens_by_gpt2(text)
return total_num_tokens
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment