Refactor keyword handling: Replace 'intent' with 'country' across backend and frontend
- Updated AutomationService to include estimated_word_count. - Increased stage_1_batch_size from 20 to 50 in AutomationViewSet. - Changed Keywords model to replace 'intent' property with 'country'. - Adjusted ClusteringService to allow a maximum of 50 keywords for clustering. - Modified admin and management commands to remove 'intent' and use 'country' instead. - Updated serializers to reflect the change from 'intent' to 'country'. - Adjusted views and filters to use 'country' instead of 'intent'. - Updated frontend forms, filters, and pages to replace 'intent' with 'country'. - Added migration to remove 'intent' field and add 'country' field to SeedKeyword model.
This commit is contained in:
@@ -1050,7 +1050,7 @@ Make sure each prompt is detailed enough for image generation, describing the vi
|
||||
|
||||
def cluster_keywords(
|
||||
self,
|
||||
keywords: List[Dict[str, Any]], # List of keyword dicts with 'keyword', 'volume', 'difficulty', 'intent'
|
||||
keywords: List[Dict[str, Any]], # List of keyword dicts with 'keyword', 'volume', 'difficulty'
|
||||
sector_name: Optional[str] = None,
|
||||
account=None,
|
||||
response_steps=None,
|
||||
@@ -1069,7 +1069,7 @@ Make sure each prompt is detailed enough for image generation, describing the vi
|
||||
Based on reference plugin's clustering prompt.
|
||||
|
||||
Args:
|
||||
keywords: List of keyword dicts with keyword, volume, difficulty, intent
|
||||
keywords: List of keyword dicts with keyword, volume, difficulty
|
||||
sector_name: Optional sector name for context
|
||||
account: Optional account for getting custom prompts
|
||||
|
||||
@@ -1085,7 +1085,7 @@ Make sure each prompt is detailed enough for image generation, describing the vi
|
||||
|
||||
# Format keywords for prompt
|
||||
keywords_text = '\n'.join([
|
||||
f"- {kw.get('keyword', '')} (Volume: {kw.get('volume', 0)}, Difficulty: {kw.get('difficulty', 0)}, Intent: {kw.get('intent', 'unknown')})"
|
||||
f"- {kw.get('keyword', '')} (Volume: {kw.get('volume', 0)}, Difficulty: {kw.get('difficulty', 0)})"
|
||||
for kw in keywords
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user