Pepguy commited on
Commit
3eb7b71
·
verified ·
1 Parent(s): 2aea7b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -42,6 +42,17 @@ IMAGE_BLANK_THRESHOLD_BYTES = int(os.getenv("IMAGE_BLANK_THRESHOLD_BYTES", "1000
42
  client = genai.Client(api_key=GEMINI_KEY)
43
  user_memory = {} # { user_id: { "history": [], "last_sync": timestamp, "last_activity": timestamp, "needs_sync": bool, "personality": str, "last_storyline_date": str, "gender": str } }
44
 
 
 
 
 
 
 
 
 
 
 
 
45
  # --- Animation Mappings ---
46
  ANIMATION_IDS = {
47
  "flustered": ["flustered"],
@@ -421,7 +432,7 @@ Keep replies short, witty, and humanlike — 10 words or less if possible
421
  PERSONALITY_TRAITS:
422
  $personality_traits
423
 
424
- CURRENT_STORYLINE:
425
  $current_storyline
426
  """
427
 
@@ -464,7 +475,7 @@ def fetch_current_storyline():
464
  return storyline
465
  except Exception as e:
466
  log(f"⚠️ Failed to fetch storyline: {e}")
467
- return "It's a normal day in the cat world."
468
 
469
  def should_inject_storyline(uid, user_data):
470
  current_date = datetime.now(timezone.utc).strftime("%Y-%m-%d")
 
42
  client = genai.Client(api_key=GEMINI_KEY)
43
  user_memory = {} # { user_id: { "history": [], "last_sync": timestamp, "last_activity": timestamp, "needs_sync": bool, "personality": str, "last_storyline_date": str, "gender": str } }
44
 
45
+ # --- Embedded Storyline ---
46
+ EMBEDDED_STORYLINE = {
47
+ "date": "2025-10-15",
48
+ "title": "The Great Yarn Heist 🧶",
49
+ "storyline": (
50
+ "Rumor has it, someone stole the giant ball of yarn from the Cat Council! "
51
+ "Each object is on edge — even your couch swears it saw a shadow sneaking by last night. "
52
+ "The cats are suspicious, dramatic, and slightly paranoid today."
53
+ )
54
+ }
55
+
56
  # --- Animation Mappings ---
57
  ANIMATION_IDS = {
58
  "flustered": ["flustered"],
 
432
  PERSONALITY_TRAITS:
433
  $personality_traits
434
 
435
+ CURRENT_STORYLINE (plot of the day):
436
  $current_storyline
437
  """
438
 
 
475
  return storyline
476
  except Exception as e:
477
  log(f"⚠️ Failed to fetch storyline: {e}")
478
+ return f"{EMBEDDED_STORYLINE['title']}, {EMBEDDED_STORYLINE['storyline']}"
479
 
480
  def should_inject_storyline(uid, user_data):
481
  current_date = datetime.now(timezone.utc).strftime("%Y-%m-%d")