Skip to content

Commit 71ab877

Browse files
authored
Merge pull request #147 from Fr4nc3/main
rename human clarification method and remove old tools json files
2 parents 31ee6b2 + 1251a27 commit 71ab877

File tree

8 files changed

+31
-2932
lines changed

8 files changed

+31
-2932
lines changed

src/backend/kernel_agents/human_agent.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ async def handle_human_feedback(self, human_feedback: HumanFeedback) -> str:
169169

170170
return "Human feedback processed successfully"
171171

172-
async def provide_clarification(
172+
async def handle_human_clarification(
173173
self, human_clarification: HumanClarification
174174
) -> str:
175175
"""Provide clarification on a plan.
@@ -196,7 +196,16 @@ async def provide_clarification(
196196
# Update the plan with the clarification
197197
plan.human_clarification_response = clarification_text
198198
await self._memory_store.update_plan(plan)
199-
199+
await self._memory_store.add_item(
200+
AgentMessage(
201+
session_id=human_clarification.session_id,
202+
user_id=self._user_id,
203+
plan_id="",
204+
content=f"{human_clarification.human_clarification}",
205+
source=AgentType.HUMAN.value,
206+
step_id="",
207+
)
208+
)
200209
# Track the event
201210
track_event_if_configured(
202211
"Human Agent - Provided clarification for plan",
@@ -205,7 +214,26 @@ async def provide_clarification(
205214
"user_id": self._user_id,
206215
"plan_id": plan.id,
207216
"clarification": clarification_text,
217+
"source": AgentType.HUMAN.value,
218+
},
219+
)
220+
await self._memory_store.add_item(
221+
AgentMessage(
222+
session_id=session_id,
223+
user_id=self._user_id,
224+
plan_id="",
225+
content="Thanks. The plan has been updated.",
226+
source=AgentType.PLANNER.value,
227+
step_id="",
228+
)
229+
)
230+
track_event_if_configured(
231+
"Planner - Updated with HumanClarification and added into the cosmos",
232+
{
233+
"session_id": session_id,
234+
"user_id": self._user_id,
235+
"content": "Thanks. The plan has been updated.",
236+
"source": AgentType.PLANNER.value,
208237
},
209238
)
210-
211239
return f"Clarification provided for plan {plan.id}"

src/backend/tools_old/generic_tools.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)