Revert date injection from system prompt

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ubuntu 2026-02-24 06:46:42 +00:00
commit 69b749930c

View file

@ -3,7 +3,6 @@
import logging import logging
import re import re
from dataclasses import dataclass from dataclasses import dataclass
from datetime import datetime, timezone
from enum import Enum, auto from enum import Enum, auto
from typing import Optional from typing import Optional
@ -158,11 +157,10 @@ class MessageRouter:
# Get conversation history # Get conversation history
history = await self.history.get_history_for_llm(message.sender_id) history = await self.history.get_history_for_llm(message.sender_id)
# Get system prompt from config, inject current date # Get system prompt from config
system_prompt = "" system_prompt = ""
if getattr(self.config.llm, 'use_system_prompt', True): if getattr(self.config.llm, 'use_system_prompt', True):
today = datetime.now(timezone.utc).strftime("%A, %B %d, %Y") system_prompt = self.config.llm.system_prompt
system_prompt = f"{self.config.llm.system_prompt}\nToday's date is {today}."
try: try:
response = await self.llm.generate( response = await self.llm.generate(