From bb40f215e04f1a60547d8964560acf3104b88214 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 28 Apr 2025 14:37:44 -0700 Subject: [PATCH] add OpenAIModerationResponse as a type --- litellm/types/llms/openai.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/litellm/types/llms/openai.py b/litellm/types/llms/openai.py index be5f7585bfd..912f8be2cbd 100644 --- a/litellm/types/llms/openai.py +++ b/litellm/types/llms/openai.py @@ -1268,3 +1268,21 @@ class ImageGenerationRequestQuality(str, Enum): AUTO = "auto" STANDARD = "standard" HD = "hd" + + +class OpenAIModerationResponse(BaseLiteLLMOpenAIResponseObject): + """ + Response from the OpenAI Moderation API. + """ + + id: str + """The unique identifier for the moderation request.""" + + model: str + """The model used to generate the moderation results.""" + + results: List[Dict] + """A list of moderation objects.""" + + # Define private attributes using PrivateAttr + _hidden_params: dict = PrivateAttr(default_factory=dict)