start ai-moderation

This commit is contained in:
SlimusMinus
2026-07-17 01:06:36 +03:00
parent eb6556212b
commit 1132a774af
18 changed files with 297 additions and 3 deletions

View File

@@ -0,0 +1,4 @@
from pydantic import BaseModel, Field
class TextRequest(BaseModel):
text: str = Field(..., description="The text to be moderated")

View File

@@ -0,0 +1,6 @@
from pydantic import BaseModel, Field
class ModerationResponse(BaseModel):
approved: bool = Field(..., description="Indicates if the text is approved or not")
score: float = Field(..., description="The score indicating the level of toxicity or appropriateness of the text")
reason: str = Field(..., description="The reason for the moderation decision")