Multi-Modal Systems with the OpenAI API
James Chapman
Curriculum Manager, DataCamp
Traditionally,


from openai import OpenAI client = OpenAI(api_key="ENTER API KEY")response = client.moderations.create(model="text-moderation-latest",input="I could kill for a hamburger.")
categoriestrue/false indicator of category violationcategory_scoresflaggedtrue/false indicator of a violation



CategoryScores(harassment=2.775943e-05,
harassment_threatening=1.3526056e-06,
hate=2.733528e-07,
hate_threatening=4.930576e-08,
...,
violence=0.0500854030251503,
...)
Multi-Modal Systems with the OpenAI API