ФУНКЦИИ - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: очередь Voice Tasker и concurrency control
This commit is contained in:
@@ -36,6 +36,7 @@ class WorkspaceAISettingsSerializer(BaseSerializer):
|
||||
"per_user_daily_limit",
|
||||
"workspace_daily_limit",
|
||||
"project_daily_limit",
|
||||
"workspace_concurrency_limit",
|
||||
"credential",
|
||||
"openai_api_key",
|
||||
"created_at",
|
||||
@@ -123,6 +124,11 @@ class WorkspaceAISettingsSerializer(BaseSerializer):
|
||||
raise serializers.ValidationError("Project daily limit must be between 1 and 50000.")
|
||||
return value
|
||||
|
||||
def validate_workspace_concurrency_limit(self, value):
|
||||
if value < 1 or value > 50:
|
||||
raise serializers.ValidationError("Workspace concurrency limit must be between 1 and 50.")
|
||||
return value
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
api_key = validated_data.pop("openai_api_key", None)
|
||||
default_project_id = validated_data.pop("default_project_id", serializers.empty)
|
||||
|
||||
Reference in New Issue
Block a user