feat: add NSFW script generation feature and Grok API configuration
This commit is contained in:
@@ -33,6 +33,7 @@ class User(UserBase):
|
||||
is_active: bool
|
||||
is_superuser: bool
|
||||
can_use_local_model: bool
|
||||
can_use_nsfw: bool = False
|
||||
created_at: datetime
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
@@ -41,6 +42,7 @@ class UserCreateByAdmin(UserBase):
|
||||
password: str = Field(..., min_length=8, max_length=128)
|
||||
is_superuser: bool = False
|
||||
can_use_local_model: bool = False
|
||||
can_use_nsfw: bool = False
|
||||
|
||||
@field_validator('password')
|
||||
@classmethod
|
||||
@@ -60,6 +62,7 @@ class UserUpdate(BaseModel):
|
||||
is_active: Optional[bool] = None
|
||||
is_superuser: Optional[bool] = None
|
||||
can_use_local_model: Optional[bool] = None
|
||||
can_use_nsfw: Optional[bool] = None
|
||||
|
||||
@field_validator('username')
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user