Skip to content

Commit 678475b

Browse files
committed
add missing feedback
1 parent 87b0000 commit 678475b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/backend/kernel_agents/agent_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ async def handle_action_request(self, action_request: ActionRequest) -> str:
161161
# thread=step.session_id
162162
# ) # AzureAIAgentThread(thread_id=step.session_id)
163163
async_generator = self._agent.invoke(
164-
messages=f"{action_request.action}\n\nPlease perform this action",
164+
messages=f"{str(self._chat_history)}\n\nPlease perform this action",
165165
thread=thread,
166166
)
167167

src/backend/kernel_agents/group_chat_manager.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class Step(BaseDataModel):
198198
)
199199
if plan.human_clarification_response:
200200
received_human_feedback_on_plan = (
201-
plan.human_clarification_response
201+
f"{plan.human_clarification_request}: {plan.human_clarification_response}"
202202
+ " This information may or may not be relevant to the step you are executing - it was feedback provided by the human user on the overall plan, which includes multiple steps, not just the one you are actioning now."
203203
)
204204
else:
@@ -313,6 +313,12 @@ async def _execute_step(self, session_id: str, step: Step):
313313
formatted_string = ""
314314
formatted_string += "<conversation_history>Here is the conversation history so far for the current plan. This information may or may not be relevant to the step you have been asked to execute."
315315
formatted_string += f"The user's task was:\n{plan.summary}\n\n"
316+
formatted_string += (
317+
f" human_clarification_request:\n{plan.human_clarification_request}\n\n"
318+
)
319+
formatted_string += (
320+
f" human_clarification_response:\n{plan.human_clarification_response}\n\n"
321+
)
316322
formatted_string += (
317323
"The conversation between the previous agents so far is below:\n"
318324
)
@@ -323,7 +329,7 @@ async def _execute_step(self, session_id: str, step: Step):
323329
break
324330
formatted_string += f"Step {i}\n"
325331
formatted_string += f"{AgentType.GROUP_CHAT_MANAGER.value}: {step.action}\n"
326-
formatted_string += f"{step.agent.name}: {step.agent_reply}\n"
332+
formatted_string += f"{step.agent.value}: {step.agent_reply}\n"
327333
formatted_string += "<conversation_history \\>"
328334

329335
logging.info(f"Formatted string: {formatted_string}")

0 commit comments

Comments
 (0)