OpenCompass/opencompass/datasets/PMMEval/mifeval_utils/keywords_checker.py
wanyu2018umac 90efcf2216
[Feature] Add P-MMEval (#1714)
* Update with PMMEval

* Update

* Update __init__.py

* Fix Bugs

* Delete .pre-commit-config.yaml

* Pull merge

---------

Co-authored-by: liushz <qq1791167085@163.com>
2024-11-27 21:26:18 +08:00

13 lines
344 B
Python
Executable File

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
},
}