fixed messages about parallel generation of personas when only one persona is being generated - actually just removed the parallel language from all the notifications

This commit is contained in:
michael 2025-08-26 14:23:27 -05:00
parent 8a750ed072
commit 6fa8d5ec55
4 changed files with 13 additions and 13 deletions

View file

@ -466,13 +466,13 @@ def batch_generate_personas():
audience_brief=custom_data.get('audience_brief')
)
# Add to the list of tasks to be executed in parallel
# Add to the list of tasks to be executed
generation_tasks.append({
'prompt_customization': custom_prompt,
'temperature': temperature
})
# Generate personas in parallel
# Generate personas
personas = []
with concurrent.futures.ThreadPoolExecutor(max_workers=min(count, 4)) as executor:
# Start the generation tasks
@ -495,7 +495,7 @@ def batch_generate_personas():
raise PersonaGenerationError(f"Failed to generate one of the personas: {str(exc)}")
return jsonify({
"message": f"Successfully generated {len(personas)} personas in parallel",
"message": f"Successfully generated {len(personas)} personas",
"personas": personas
}), 200
@ -547,13 +547,13 @@ def batch_generate_and_save_personas():
audience_brief=custom_data.get('audience_brief')
)
# Add to the list of tasks to be executed in parallel
# Add to the list of tasks to be executed
generation_tasks.append({
'prompt_customization': custom_prompt,
'temperature': temperature
})
# Generate personas in parallel
# Generate personas
generated_personas = []
with concurrent.futures.ThreadPoolExecutor(max_workers=min(count, 4)) as executor:
# Start the generation tasks
@ -611,7 +611,7 @@ def batch_generate_and_save_personas():
persona_ids.append(str(persona_id))
return jsonify({
"message": f"Successfully generated and saved {len(personas)} personas in parallel",
"message": f"Successfully generated and saved {len(personas)} personas",
"personas": personas,
"persona_ids": persona_ids
}), 201
@ -760,7 +760,7 @@ def batch_generate_summaries():
Generate comprehensive markdown summaries for multiple personas for download/client review.
This endpoint takes a list of persona IDs, fetches their complete data, and generates
detailed summaries using LLM processing. Personas are processed in parallel batches of 10
detailed summaries using LLM processing. Personas are processed in batches of 10
to optimize performance while staying within API limits. No upper limit on persona count.
Request body:
@ -852,7 +852,7 @@ def batch_generate_summaries():
batch = personas_data[i:i + batch_size]
current_app.logger.info(f"Processing batch {i//batch_size + 1}: {len(batch)} personas")
# Process this batch in parallel
# Process this batch
with concurrent.futures.ThreadPoolExecutor(max_workers=batch_size) as executor:
# Submit all tasks for this batch
future_to_persona = {

View file

@ -89,7 +89,7 @@ export default function AIRecruiter({ targetFolderId, targetFolderName }: AIRecr
});
}
toast.info("Generating AI personas in parallel", {
toast.info("Generating AI personas", {
description: `Creating ${count} synthetic personas based on your brief. This may take ${estimatedTime}. Please be patient.`,
duration: 10000
});
@ -320,7 +320,7 @@ export default function AIRecruiter({ targetFolderId, targetFolderName }: AIRecr
{isGenerating && (
<div className="mb-6">
<div className="flex justify-between items-center mb-2">
<span className="text-sm font-medium">Generating personas in parallel...</span>
<span className="text-sm font-medium">Generating personas...</span>
<span className="text-sm text-muted-foreground">{Math.round(generationProgress)}%</span>
</div>
<Progress value={generationProgress} className="h-2" />

View file

@ -438,7 +438,7 @@ export default function AIRecruiterForm({ onSubmit, isGenerating }: AIRecruiterF
</Button>
{isGenerating && (
<div className="text-xs text-muted-foreground mt-2">
Generating multiple personas in parallel. This may take 1-2 minutes...
Generating personas. This may take 1-2 minutes...
</div>
)}
</div>

View file

@ -5,7 +5,7 @@ import { aiPersonasApi, personasApi, foldersApi } from "@/lib/api";
* Generate synthetic personas using the AI endpoint
* Using a two-stage approach:
* 1. Generate basic profiles in one call
* 2. Expand each profile into a full persona in parallel
* 2. Expand each profile into a full persona
*
* @param brief Audience brief to guide persona generation
* @param researchObjective Optional research objective to focus persona goals and scenarios
@ -28,7 +28,7 @@ export async function generateSyntheticPersonas(
console.log(`🔄 generateSyntheticPersonas using model: ${llmModel || 'gemini-2.5-pro'}`);
try {
// We'll use the two-stage approach which leverages parallel processing
// We'll use the two-stage approach
console.log(`Generating ${count} synthetic personas using two-stage approach...`);
// First, check if the brief is too short to be useful