CineAI commited on
Commit
0871e09
1 Parent(s): 31d6d3c

4172637469634d6f6e6b6579733a31382e30382e3234

Browse files
Files changed (1) hide show
  1. utils/prompt_toggle.py +1 -1
utils/prompt_toggle.py CHANGED
@@ -47,7 +47,7 @@ def select_prompt(input_text: str, prompts: Any, keywords: Dict[str, List[str]])
47
  matched_categories = list(matched_keywords.keys())
48
 
49
  # Default to the highest rated common prompt if no specific category is matched
50
- selected_prompt = max((p for p in prompts if 'common' in p['purpose']), key=lambda p: p['rate'], default=None)
51
 
52
  for category in matched_categories:
53
  category_prompts = [p for p in prompts if category in p['purpose']]
 
47
  matched_categories = list(matched_keywords.keys())
48
 
49
  # Default to the highest rated common prompt if no specific category is matched
50
+ selected_prompt = max((p for p in prompts if 'common' in p['purpose'] or 'загальні' in p['purpose']), key=lambda p: p['rate'], default=None)
51
 
52
  for category in matched_categories:
53
  category_prompts = [p for p in prompts if category in p['purpose']]