mirror of https://github.com/langgenius/dify.git
feat: disable token counting in GPT2Tokenizer by returning 0.
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
8e75eb5c63
commit
193aaaeab6
|
|
@ -25,7 +25,8 @@ class GPT2Tokenizer:
|
|||
# future = _executor.submit(GPT2Tokenizer._get_num_tokens_by_gpt2, text)
|
||||
# result = future.result()
|
||||
# return cast(int, result)
|
||||
return GPT2Tokenizer._get_num_tokens_by_gpt2(text)
|
||||
# return GPT2Tokenizer._get_num_tokens_by_gpt2(text)
|
||||
return 0
|
||||
|
||||
@staticmethod
|
||||
def get_encoder() -> Any:
|
||||
|
|
|
|||
Loading…
Reference in New Issue