update method name to run_moderation

This commit is contained in:
Swapna Lekkala 2025-08-04 14:15:42 -07:00
parent 70ebc4b448
commit 2d608ddd3b
6 changed files with 295 additions and 295 deletions

View file

@ -114,7 +114,7 @@ class Safety(Protocol):
...
@webmethod(route="/openai/v1/moderations", method="POST")
async def create(self, input: str | list[str], model: str) -> ModerationObject:
async def run_moderation(self, input: str | list[str], model: str) -> ModerationObject:
"""Classifies if text and/or image inputs are potentially harmful.
:param input: Input (or inputs) to classify.
Can be a single string, an array of strings, or an array of multi-modal input objects similar to other models.