6
This commit is contained in:
@@ -34,14 +34,15 @@ class AutoClusterFunction(BaseAIFunction):
|
||||
}
|
||||
|
||||
def get_max_items(self) -> int:
|
||||
return 20
|
||||
# No limit - return None
|
||||
return None
|
||||
|
||||
def validate(self, payload: dict, account=None) -> Dict:
|
||||
"""Custom validation for clustering with plan limit checks"""
|
||||
from igny8_core.ai.validators import validate_ids, validate_keywords_exist, validate_cluster_limits
|
||||
"""Custom validation for clustering"""
|
||||
from igny8_core.ai.validators import validate_ids, validate_keywords_exist
|
||||
|
||||
# Base validation
|
||||
result = validate_ids(payload, max_items=self.get_max_items())
|
||||
# Base validation (no max_items limit)
|
||||
result = validate_ids(payload, max_items=None)
|
||||
if not result['valid']:
|
||||
return result
|
||||
|
||||
@@ -51,10 +52,7 @@ class AutoClusterFunction(BaseAIFunction):
|
||||
if not keywords_result['valid']:
|
||||
return keywords_result
|
||||
|
||||
# Check plan limits
|
||||
limit_result = validate_cluster_limits(account, operation_type='cluster')
|
||||
if not limit_result['valid']:
|
||||
return limit_result
|
||||
# Removed plan limits check
|
||||
|
||||
return {'valid': True}
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ class GenerateContentFunction(BaseAIFunction):
|
||||
}
|
||||
|
||||
def get_max_items(self) -> int:
|
||||
return 50 # Max tasks per batch
|
||||
# No limit - return None
|
||||
return None
|
||||
|
||||
def validate(self, payload: dict, account=None) -> Dict:
|
||||
"""Validate task IDs"""
|
||||
|
||||
@@ -9,7 +9,7 @@ from django.db import transaction
|
||||
from igny8_core.ai.base import BaseAIFunction
|
||||
from igny8_core.modules.planner.models import Clusters, ContentIdeas
|
||||
from igny8_core.ai.ai_core import AICore
|
||||
from igny8_core.ai.validators import validate_cluster_exists, validate_cluster_limits
|
||||
from igny8_core.ai.validators import validate_cluster_exists
|
||||
from igny8_core.ai.tracker import ConsoleStepTracker
|
||||
from igny8_core.ai.prompts import PromptRegistry
|
||||
from igny8_core.ai.settings import get_model_config
|
||||
@@ -38,10 +38,11 @@ class GenerateIdeasFunction(BaseAIFunction):
|
||||
}
|
||||
|
||||
def get_max_items(self) -> int:
|
||||
return 10 # Max clusters per idea generation
|
||||
# No limit - return None
|
||||
return None
|
||||
|
||||
def validate(self, payload: dict, account=None) -> Dict:
|
||||
"""Validate cluster IDs and plan limits"""
|
||||
"""Validate cluster IDs"""
|
||||
result = super().validate(payload, account)
|
||||
if not result['valid']:
|
||||
return result
|
||||
@@ -54,10 +55,7 @@ class GenerateIdeasFunction(BaseAIFunction):
|
||||
if not cluster_result['valid']:
|
||||
return cluster_result
|
||||
|
||||
# Check plan limits
|
||||
limit_result = validate_cluster_limits(account, operation_type='idea')
|
||||
if not limit_result['valid']:
|
||||
return limit_result
|
||||
# Removed plan limits check
|
||||
|
||||
return {'valid': True}
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@ class GenerateImagesFunction(BaseAIFunction):
|
||||
}
|
||||
|
||||
def get_max_items(self) -> int:
|
||||
return 20 # Max tasks per batch
|
||||
# No limit - return None
|
||||
return None
|
||||
|
||||
def validate(self, payload: dict, account=None) -> Dict:
|
||||
"""Validate task IDs"""
|
||||
|
||||
Reference in New Issue
Block a user