Problem/Motivation

The OpenAiProvider::embeddings() OpenAiProvider::chat() OpenAiProvider::textToImage() and OpenAiProvider::textToSpeech()methods accept a $tags array, which is used to pass context or flags (such as 'skip_moderation').

However, the current implementation calls $this->moderationEndpoints($input) unconditionally, even if the skip_moderation tag is present, so the module still performs a moderation request regardless.

Steps to reproduce

Proposed resolution

Update embeddings(), chat(), and other relevant methods to check if the skip_moderation tag is present before calling the moderation endpoint.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ben.bastow created an issue. See original summary.

ben.bastow’s picture

Status: Active » Needs review
scott_euser’s picture

Assigned: ben.bastow » Unassigned
Status: Needs review » Reviewed & tested by the community
scott_euser’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Ah looks like its already available in #3510601: Allow skipping of moderations for some embeddings (not all), credited you there, closing this as a duplicate as it came later.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.