Maybe "openai" module for python is missing on your working enviroment, try running this in your terminal:
python -m pip install --upgrade openai
This command is going to download and install openai module for python.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence