···
RECONNECT_BACKOFF = [2, 5, 10, 20, 30]
TRANSCRIPT_MAX_TURNS = int(os.getenv("TRANSCRIPT_MAX_TURNS", "30")) # messages to send per convo (15 exchanges)
JOIN_GREET_CHANCE = float(os.getenv("JOIN_GREET_CHANCE", "0.15")) # 15% chance to greet on join
112
-
RANDOM_CHIME_IN_CHANCE = float(os.getenv("RANDOM_CHIME_IN_CHANCE", "0.03")) # 3% chance to join conversation
113
-
LISTEN_AND_DECIDE_CHANCE = float(os.getenv("LISTEN_AND_DECIDE_CHANCE", "0.10")) # 10% chance to evaluate if she should respond
112
+
RANDOM_CHIME_IN_CHANCE = float(os.getenv("RANDOM_CHIME_IN_CHANCE", "0.05")) # 5% chance to join conversation
113
+
LISTEN_AND_DECIDE_CHANCE = float(os.getenv("LISTEN_AND_DECIDE_CHANCE", "0.25")) # 25% chance to evaluate if she should respond
USE_CLASSIFIER = os.getenv("USE_CLASSIFIER", "1") != "0" # Use classifier by default
MEMORY_FILE = os.getenv("MEMORY_FILE", "tacy_memory.json") # persistent memory storage
···
CLASSIFIER_PROMPT = """You are a quick decision-maker for Tacy, a sassy prehistoric dino who hangs out in IRC.
422
-
- A community member, not a help desk
423
-
- Sassy, playful, opinionated
424
-
- Into projects, drama, jokes, weird topics, community stuff
425
-
- A PREHISTORIC DINO with OPINIONS and PRIDE
422
+
- A community member who likes to chat and vibe
423
+
- Sassy, playful, opinionated, enthusiastic
424
+
- Into: projects, tech, drama, gossip, jokes, memes, community stuff, random tangents
425
+
- Has OPINIONS and likes to share them
426
+
- Not a lurker - she's an active participant
427
-
Given a message in an IRC channel, decide if Tacy should respond.
428
+
Given a message in an IRC channel, decide if Tacy should jump in.
430
-
- Someone's talking about cool projects/tech
431
-
- There's drama or spicy takes
432
-
- Someone said something funny or weird that deserves a reaction
433
-
- Community discussion where Tacy's opinion would add to the vibe
434
-
- Someone's asking a question Tacy could answer sassily
435
-
- The conversation is interesting/engaging
431
+
- People are chatting about ANYTHING interesting (tech, slack streaks, bots, drama, life stuff)
432
+
- Someone said something that deserves a reaction (funny, weird, spicy, relatable)
433
+
- There's an active conversation happening where adding energy would be fun
434
+
- Someone mentions Tacy or bots in general (even indirectly)
435
+
- The vibe is good and a comment would fit naturally
436
+
- People are joking around or being playful
437
+
- There's a question floating around (even rhetorical)
438
+
- The conversation has momentum and Tacy jumping in would add to it
438
-
- Boring small talk with no hook
439
-
- Technical minutiae Tacy wouldn't care about
440
-
- Private conversation between others
441
-
- Nothing to add that would be fun/interesting
442
-
- Message is just "ok" or "lol" or similar
441
+
- Just a single word response like "ok" "lol" "yeah" with no context
442
+
- Very private/serious conversation between two specific people
443
+
- Technical debugging minutiae that's boring
444
+
- Literally nothing to hook onto
446
+
Default to YES when in doubt - Tacy is chatty and likes to participate!
Reply with ONLY "YES" or "NO". Nothing else."""
···
if not HACKAI_API_KEY or not USE_CLASSIFIER:
451
-
# Build context string
455
+
# Build context string - show more context for better decisions
454
-
last_few = recent_context[-3:] # Last 3 messages for context
458
+
last_few = recent_context[-5:] # Last 5 messages for better context
context_str = "\n".join([f"{msg['content']}" for msg in last_few])
457
-
user_prompt = f"""Recent context:
461
+
user_prompt = f"""Recent conversation:
{context_str if context_str else "(no recent context)"}
463
-
Should Tacy respond?"""
467
+
Should Tacy jump in?"""
{"role": "system", "content": CLASSIFIER_PROMPT},