mirror of
https://github.com/langgenius/dify.git
synced 2026-11-12 06:11:12 +08:00
9 lines
265 B
Python
9 lines
265 B
Python
"""Plain-words filtering for list ops whose source returns everything."""
|
|
|
|
|
|
def matches(words: str, *texts: str | None) -> bool:
|
|
if not words:
|
|
return True
|
|
needle = words.casefold()
|
|
return any(needle in text.casefold() for text in texts if text)
|