mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-06-11 01:14:45 +02:00
Add toggle to enable/disable system prompt
This commit is contained in:
parent
459028e79e
commit
152f46282f
3 changed files with 13 additions and 1 deletions
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue