mirror of
https://github.com/open-compass/opencompass.git
synced 2025-05-30 16:03:24 +08:00
13 lines
344 B
Python
13 lines
344 B
Python
![]() |
def forbidden_words_checker(input_string: str, forbidden_words: list,
|
||
|
**kwargs):
|
||
|
return not any(word in input_string for word in forbidden_words)
|
||
|
|
||
|
|
||
|
keywords_checker = {
|
||
|
'forbidden_words': {
|
||
|
'function': forbidden_words_checker,
|
||
|
'required_lang_code': False,
|
||
|
'num_of_params': 2
|
||
|
},
|
||
|
}
|