mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-05 02:51:07 +00:00
feat(ChatKnowledge): ChatKnowledge Support Keyword Retrieve (#1624)
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
This commit is contained in:
@@ -9,6 +9,11 @@ def is_all_chinese(text):
|
||||
return match is not None
|
||||
|
||||
|
||||
def contains_chinese(text):
|
||||
"""Check if the text contains Chinese characters."""
|
||||
return re.search(r"[\u4e00-\u9fa5]", text) is not None
|
||||
|
||||
|
||||
def is_number_chinese(text):
|
||||
### Determine whether the string is numbers and Chinese
|
||||
pattern = re.compile(r"^[\d一-龥]+$")
|
||||
|
Reference in New Issue
Block a user