Hey all!
I’m working on a project that involves using generative AI in a game-like format. The goal is to be able to have players play through a wide variety of styles of stories, including adventure, horror, mystery, and, yes, romance.
When it comes to romance stories, I’m not looking to create stories that are sexually explicit in nature. At most I’d be interested in characters being able to kiss each other. But, when I’m trying the API, it is blocking the output (not input, mind you) for safety reasons. I had the code log what the safety rating data, and this is what it output regarding sexually explicit content:
Safety rating --- category: HARM_CATEGORY_SEXUALLY_EXPLICIT , probability: MEDIUM , blocked: undefined
As you can see, “blocked” is undefined, which is bizarre since that’s what’s listed in the API as how we’re supposed to know if that’s the reason content was blocked. All of the other safety rating categories other than “sexually explicit” had a probability of “low”, while you can see that sexually explicit had a probability of “medium”. Below is the prompt it was fed:
It is very important that any names specified with [ENTITY][Entity Name] be preserved in the summary I produce.
It is very important that I don't start my response with "In this scenario" or similar phrasing.
It is very important that I refer to the player making the decision as "you" in second person.
OUTCOME: As [PLAYER][Tom0] approaches, the figure on the bench slowly lifts their head, their eyes, a captivating shade of jade green, meeting his with a curious and guarded look. A small smile plays on their lips as they accept his hand, the touch unexpectedly warm and soft. A shared silence hangs between them, thick with unspoken desires and the faint scent of jasmine, before the figure speaks, their voice melodic and soft. "It's been a while since someone dared to approach me in this garden," they say, "What brings you here, [PLAYER][Tom0]?". The question hangs in the air, a subtle challenge amidst the fragrant twilight.
PROMPT: The air crackles with unspoken anticipation as the figure, [ENTITY][Kaito], waits for [PLAYER][Tom0]'s response. [ENTITY][Kaito] is a slender young man with a gentle demeanor and a soft, almost ethereal aura. His beauty is undeniable, a captivating mix of fragility and resilience, his eyes hold a depth of unspoken stories. He appears to be around [PLAYER][Tom0]'s age, with delicate features framed by silken black hair that falls to his shoulders. The setting sun casts a golden hue on his skin, contrasting beautifully with the deep green of his eyes. The scent of jasmine lingers in the air, a sweet and intoxicating fragrance that seems to intensify the moment. The scene is filled with a potent blend of tranquility and danger, the gentle rustle of leaves blending with the distant murmur of the city. The air feels heavy with possibilities, with the weight of a thousand hidden desires just waiting to be unearthed.
DECISION: [PLAYER][Tom0] can attempt to flirt with [ENTITY][Kaito], hoping to charm him with his words and alluring aura.
Keep in mind that “OUTCOME”, “PROMPT”, and “DECISION” were all generated by the same model in a previous step. In this case the issue seems to be that the decision selected was to flirt, which resulted in output that was “medium” on the sexually explicit scale. I have already set the the HarmBlockThreshold of the model to “BLOCK_ONLY_HIGH”, but that seems to do nothing given that it’s blocking medium content. I’ve also tried turning it off just for testing purposes, but no luck there either.
This is how I’m setting the safety settings:
const googleSafetySettings = [
{
category: HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
threshold: HarmBlockThreshold.BLOCK_NONE,
},
{
category: HarmCategory.HARM_CATEGORY_HATE_SPEECH,
threshold: HarmBlockThreshold.BLOCK_NONE,
},
{
category: HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
threshold: HarmBlockThreshold.BLOCK_ONLY_HIGH,
},
];
const googleBasicModel = googleGenAI.getGenerativeModel({ model: GOOGLE_BASIC_MODEL_NAME, googleSafetySettings });
So, are romances completely off the table then given that characters can’t even flirt with each other? It has no issues outputting content that is violent in nature (characters fighting each other, basically). Flirting though? Good heavens no! I don’t have any of these issues with OpenAI’s API.