Add toggle to enable/disable system prompt

This commit is contained in:
Matt 2025-12-15 13:56:10 -07:00
commit 152f46282f
3 changed files with 13 additions and 1 deletions

View file

@ -130,10 +130,15 @@ class MessageRouter:
history = await self.history.get_history_for_llm(message.sender_id)
# Generate response with user_id for memory optimization
# Use system prompt only if enabled in config
system_prompt = ""
if getattr(self.config.llm, 'use_system_prompt', True):
system_prompt = self.config.llm.system_prompt
try:
response = await self.llm.generate(
messages=history,
system_prompt=self.config.llm.system_prompt,
system_prompt=system_prompt,
max_tokens=300,
user_id=message.sender_id, # Enable memory optimization
)