mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-16 18:12:38 +00:00
PR-437-Fixed bug to allow system instructions after first turn
This commit is contained in:
parent
36b052ab10
commit
e6e49e1bc6
1 changed files with 1 additions and 1 deletions
|
|
@ -156,7 +156,7 @@ class ChatAgent(ShieldRunnerMixin):
|
||||||
turns = await self.storage.get_session_turns(request.session_id)
|
turns = await self.storage.get_session_turns(request.session_id)
|
||||||
|
|
||||||
messages = []
|
messages = []
|
||||||
if len(turns) == 0 and self.agent_config.instructions != "":
|
if self.agent_config.instructions != "":
|
||||||
messages.append(SystemMessage(content=self.agent_config.instructions))
|
messages.append(SystemMessage(content=self.agent_config.instructions))
|
||||||
|
|
||||||
for i, turn in enumerate(turns):
|
for i, turn in enumerate(turns):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue