forked from phoenix-oss/llama-stack-mirror
Respect user sent instructions in agent config and add them to system prompt
This commit is contained in:
parent
06abd7e6c8
commit
8bf8c07eb3
1 changed files with 3 additions and 3 deletions
|
@ -127,14 +127,14 @@ class ChatAgent(ShieldRunnerMixin):
|
|||
session = self.sessions[request.session_id]
|
||||
|
||||
messages = []
|
||||
if len(session.turns) == 0 and self.agent_config.instructions != "":
|
||||
messages.append(SystemMessage(content=self.agent_config.instructions))
|
||||
|
||||
for i, turn in enumerate(session.turns):
|
||||
messages.extend(self.turn_to_messages(turn))
|
||||
|
||||
messages.extend(request.messages)
|
||||
|
||||
# print("processed dialog ======== ")
|
||||
# print_dialog(messages)
|
||||
|
||||
turn_id = str(uuid.uuid4())
|
||||
start_time = datetime.now()
|
||||
yield AgentTurnResponseStreamChunk(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue