fixed code
This commit is contained in:
@@ -3,4 +3,4 @@ from pydantic import BaseModel
|
||||
|
||||
class ErrorResponse(BaseModel):
|
||||
code: str
|
||||
message: str
|
||||
message: str
|
||||
|
||||
@@ -4,7 +4,6 @@ from pydantic import BaseModel
|
||||
|
||||
|
||||
class ImageModerationResponse(BaseModel):
|
||||
|
||||
approved: bool
|
||||
|
||||
score: float
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
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")
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user