Could you do this same function again, except using templates so that the input map isn't restricted to ints?
spam lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor creativity violence