added zero weight feedback ignore

This commit is contained in:
2026-01-03 23:12:22 -07:00
parent d32cfe04e1
commit 60b03f5f4b
9 changed files with 610 additions and 180 deletions

View File

@@ -197,6 +197,16 @@ class PromptService:
historic_prompts = await self.get_prompts_historic() if use_history else []
feedback_words = await self.get_feedback_active_words() if use_feedback else None
# Filter out feedback words with weight 0
if feedback_words:
feedback_words = [
word for word in feedback_words
if word.get("weight", 3) != 0 # Default weight is 3 if not specified
]
# If all words have weight 0, set to None
if not feedback_words:
feedback_words = None
# Generate prompts using AI
new_prompts = await self.ai_service.generate_prompts(
prompt_template=prompt_template,