Skip to content

[FEATURE] Add Image Support to Moderation #724

@decaffeinatedio

Description

@decaffeinatedio

Scope check

  • This is core LLM communication (not application logic)
  • This benefits most users (not just my use case)
  • This can't be solved in application code with current RubyLLM
  • I read the Contributing Guide

Due diligence

  • I searched existing issues
  • I checked the documentation

What problem does this solve?

The moderation endpoint only supports passing text, although the backing OpenAI model is multi-modal.

Proposed solution

Add new image keyword argument to the RubyLLM.moderate endpoint to allow a user to call moderation on an image, text, or both. The call will remain backwards-compatible with enabling all features available on the backend.

See draft PR here: #723

Why this belongs in RubyLLM

Image checks are a core moderation use case and this feature is well-supported by the underlying OpenAI API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions