remaining stage 1
This commit is contained in:
@@ -52,12 +52,26 @@ class ClusteringService:
|
||||
|
||||
# Delegate to AI task
|
||||
from igny8_core.ai.tasks import run_ai_task
|
||||
from django.conf import settings
|
||||
|
||||
payload = {
|
||||
'ids': keyword_ids,
|
||||
'sector_id': sector_id
|
||||
}
|
||||
|
||||
# Stage 1: When USE_SITE_BUILDER_REFACTOR is enabled, payload can include
|
||||
# taxonomy hints and dimension metadata for enhanced clustering.
|
||||
# TODO (Stage 2/3): Enhance clustering to collect and use:
|
||||
# - Taxonomy hints from SiteBlueprintTaxonomy
|
||||
# - Dimension metadata (context_type, dimension_meta) for clusters
|
||||
# - Attribute values from Keywords.attribute_values
|
||||
if getattr(settings, 'USE_SITE_BUILDER_REFACTOR', False):
|
||||
logger.info(
|
||||
f"Clustering with refactor enabled: {len(keyword_ids)} keywords, "
|
||||
f"sector_id={sector_id}, account_id={account.id}"
|
||||
)
|
||||
# Future: Add taxonomy hints and dimension metadata to payload
|
||||
|
||||
try:
|
||||
if hasattr(run_ai_task, 'delay'):
|
||||
# Celery available - queue async
|
||||
|
||||
Reference in New Issue
Block a user