Skip to content

Commit 5b9d907

Browse files
committed
model steering in notifications
1 parent 2c5b97f commit 5b9d907

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/custom_functions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ async def observe_chat():
171171
if enable_reminders:
172172
manage_reminder_function = {
173173
'name': 'manage_reminder',
174-
'description': """Manages user reminders (alerts); use if the user requests alerts, a timed notification, etc (hälytys, muistutus..) Specify the action: 'add' to create, 'view' to list pending, 'delete' to remove by ID, or 'edit' to modify by ID.
175-
- For 'add': requires 'reminder_text' and exact 'due_time_utc' (ISO 8601 format, e.g., '2025-04-04T10:00:00Z'). Calculate UTC from user input based on current system UTC time.
174+
'description': """Manages user reminders (alerts); use if the user requests alerts, a timed notification, etc (hälytys, muistutus, ajastettu viesti..) Specify the action: 'add' to create, 'view' to list pending, 'delete' to remove by ID, or 'edit' to modify by ID.
175+
If you're unsure of the user's time zone, ask it first, and set the UTC alert accordingly. For instance, Finland is UTC+2 in winter and UTC+3 during summertime. Add the reminder in the user's own language! Suomeksi, jos käyttäjä puhuu suomea! Always ask the user's timezone if unsure.
176+
- For 'add': requires 'reminder_text' and exact 'due_time_utc' (ISO 8601 format, e.g., '2025-04-04T10:00:00Z'). Calculate UTC from user input based on current system UTC time. Notifications can be up to around 4000 characters or more.
176177
- For 'view': no other parameters needed.
177178
- For 'delete': requires 'reminder_id'.
178179
- For 'edit': requires 'reminder_id' and at least one of 'reminder_text' or 'due_time_utc'.""",

src/text_message_handler.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,8 +1144,9 @@ async def handle_message(bot, update: Update, context: CallbackContext, logger)
11441144
short_system_msg = (
11451145
f"A new reminder was successfully created for <{due_time_utc}> "
11461146
f"with text: '{reminder_text}'. "
1147-
"Please give the user a concise, friendly confirmation message in their language, "
1148-
"mentioning the date/time but NOT quoting the text verbatim unless it's appropriate."
1147+
"Please give the user a concise, friendly confirmation message in the user's own language, "
1148+
"mentioning the date/time but NOT quoting the text verbatim unless it's appropriate to do so. Notice also the time zone. "
1149+
"i.e. Finland observes Eastern European Time (UTC+2) in winter and Eastern European Summer Time (UTC+3) during daylight savings. "
11491150
)
11501151
chat_history.append({"role": "system", "content": short_system_msg})
11511152
else:

0 commit comments

Comments
 (0)