"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "8b10b058e53e798ac52c7aab103bb5419a0735ae"
Unverified Commit 707f9e92 authored by Thomas Wolf's avatar Thomas Wolf Committed by GitHub
Browse files

Merge pull request #2081 from pglock/patch-1

handle string with only whitespaces as empty
parents 137e20a8 21451ec6
...@@ -669,7 +669,7 @@ class PreTrainedTokenizer(object): ...@@ -669,7 +669,7 @@ class PreTrainedTokenizer(object):
return result return result
def split_on_tokens(tok_list, text): def split_on_tokens(tok_list, text):
if not text: if not text.strip():
return [] return []
if not tok_list: if not tok_list:
return self._tokenize(text, **kwargs) return self._tokenize(text, **kwargs)
......
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