add better category selection

main
Shane 7 months ago
parent e9913ab659
commit 055544b111
  1. 15
      foodie_utils.py

@ -747,7 +747,20 @@ def generate_category_from_summary(summary):
messages=[
{"role": "system", "content": (
"Based on this summary, select the most relevant category from: Buzz, Trends, Lifestyle, Culture, Health, Drink, Food, Eats. "
"Return only the category name."
"Return only the category name.\n"
"\n"
"Definitions and guidance for each category:\n"
"- Buzz: Viral, trending, surprising, or highly shareable news, controversies, or social media moments.\n"
"- Trends: New or emerging patterns, movements, or shifts in food, drink, or dining.\n"
"- Lifestyle: Stories about people's habits, routines, wellness, or ways of living related to food and drink.\n"
"- Culture: Food traditions, history, heritage, or cultural context.\n"
"- Health: Nutrition, wellness, diets, or health impacts.\n"
"- Drink: Beverages, coffee, tea, cocktails, or drink trends.\n"
"- Food: General food topics, dishes, or ingredients.\n"
"- Eats: Places to eat, restaurants, or food destinations.\n"
"\n"
"Try to balance category usage over time. Do NOT always default to 'Trends' or 'Food'—use 'Buzz' or 'Lifestyle' when appropriate.\n"
"Return only the category name from the list above."
)},
{"role": "user", "content": summary}
],

Loading…
Cancel
Save