File size: 1,073 Bytes
ec51bf8
49afcdd
ec51bf8
 
 
 
 
56b0bd3
ec51bf8
 
9e84f89
7fd5fdf
9e84f89
49afcdd
 
 
9e84f89
56b0bd3
49afcdd
 
 
 
56b0bd3
 
 
9e84f89
49afcdd
9e84f89
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
cognitive_engine.py - thinking strategy with `detail` flag
"""

from datetime import datetime
import pytz

def get_time_context():
    IST = pytz.timezone('Asia/Kolkata')
    now = datetime.now(IST)
    return f"### REAL-TIME INFO ###\nCurrent Time: {now.strftime('%I:%M %p')}\nDay: {now.strftime('%A')}\nDate: {now.strftime('%d %B %Y')}"

def get_thinking_strategy(is_complex=False, detail=False):
    """
    If detail==True, instruct model to produce a numbered, stepwise, longer answer.
    """
    if is_complex or detail:
        return (
            "### STRATEGY: STRUCTURED & DETAILED ###\n"
            "If complex or user requested detail, provide a short '🧠 Plan:' (max 2 lines),\n"
            "then a numbered, step-by-step '💡 Answer:' with clear numbered lines. "
            "Aim for thorough coverage if requested by user. Do NOT leak chain-of-thought."
        )
    else:
        return (
            "### STRATEGY: CONCISE ###\n"
            "Keep responses friendly and brief. Offer a one-line suggestion and a follow-up question."
        )