added zero weight feedback ignore
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user