- Issue created by @wouters_f
- 🇧🇪Belgium wouters_f Leuven
Check also the related issue in openai provider.
https://www.drupal.org/project/ai_provider_openai/issues/3510601 ✨ allow skipping of moderations for some embeddings (not all) Active - 🇬🇧United Kingdom scott_euser
Yep I can see this being useful, have had to turn off moderation on a site analysing conflicts around the world in a migration project because of all the terminology commonly used - it's often rejecting things if unaware that the context is appropriate for the given site so +1 from me, thanks!
- 🇮🇳India prashant.c Dharamshala
I stumbled upon this issue and learned about the moderation process in AI calls. I also tried it in the explorer and read more about it in modules/contrib/ai/docs/developers/call_moderation.md.
While reviewing the code in the MR to understand the moderation workflow better, I noticed that since
skip_moderation
is a Boolean field, we can simplify this codeif (!empty($configuration['skip_moderation']) && is_numeric($configuration['skip_moderation'])) { $this->skipModeration = (bool) $configuration['skip_moderation']; } else { $this->skipModeration = FALSE; }
to:
$this->skipModeration = !empty($configuration['skip_moderation']);
Thank you.
- 🇧🇪Belgium wouters_f Leuven
Yes valid feedback added your proposed changes.
Thanks for this.