Skip to content

Commit 1cafaf8

Browse files
authored
Merge pull request #119 from Fr4nc3/main
GroupChatManager Rewrite
2 parents 23fa94b + c586cc8 commit 1cafaf8

22 files changed

+1040
-1203
lines changed

src/backend/agents/base_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Step,
2222
StepStatus,
2323
)
24-
from models.messages_kernel import AgentType
24+
2525
from src.backend.event_utils import track_event_if_configured
2626

2727

@@ -77,7 +77,7 @@ async def handle_action_request(
7777
AssistantMessage(content=message.action, source="GroupChatManager"),
7878
UserMessage(
7979
content=f"{step.human_feedback}. Now make the function call",
80-
source=AgentType.HUMAN.value,
80+
source="HumanAgent",
8181
),
8282
]
8383
)

src/backend/agents/group_chat_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Step,
2222
StepStatus,
2323
)
24-
from models.messages_kernel import AgentType
24+
2525
from src.backend.event_utils import track_event_if_configured
2626

2727

@@ -57,7 +57,7 @@ async def handle_input_task(
5757
user_id=self._user_id,
5858
plan_id="",
5959
content=f"{message.description}",
60-
source=AgentType.HUMAN.value,
60+
source="HumanAgent",
6161
step_id="",
6262
)
6363
)
@@ -68,7 +68,7 @@ async def handle_input_task(
6868
"session_id": message.session_id,
6969
"user_id": self._user_id,
7070
"content": message.description,
71-
"source": AgentType.HUMAN.value,
71+
"source": "HumanAgent",
7272
},
7373
)
7474

src/backend/agents/human.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
Step,
1414
)
1515
from src.backend.event_utils import track_event_if_configured
16-
from models.messages_kernel import AgentType
1716

1817

1918
@default_subscription
@@ -53,7 +52,7 @@ async def handle_step_feedback(
5352
user_id=self.user_id,
5453
plan_id=step.plan_id,
5554
content=f"Received feedback for step: {step.action}",
56-
source=AgentType.HUMAN.value,
55+
source="HumanAgent",
5756
step_id=message.step_id,
5857
)
5958
)
@@ -65,7 +64,7 @@ async def handle_step_feedback(
6564
"user_id": self.user_id,
6665
"plan_id": step.plan_id,
6766
"content": f"Received feedback for step: {step.action}",
68-
"source": AgentType.HUMAN.value,
67+
"source": "HumanAgent",
6968
"step_id": message.step_id,
7069
},
7170
)

src/backend/agents/planner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
StepStatus,
2626
HumanFeedbackStatus,
2727
)
28-
from models.messages_kernel import AgentType
28+
2929
from src.backend.event_utils import track_event_if_configured
3030

3131

@@ -133,7 +133,7 @@ async def handle_plan_clarification(
133133
user_id=self._user_id,
134134
plan_id="",
135135
content=f"{message.human_clarification}",
136-
source=AgentType.HUMAN.value,
136+
source="HumanAgent",
137137
step_id="",
138138
)
139139
)
@@ -144,7 +144,7 @@ async def handle_plan_clarification(
144144
"session_id": message.session_id,
145145
"user_id": self._user_id,
146146
"content": f"{message.human_clarification}",
147-
"source": AgentType.HUMAN.value,
147+
"source": "HumanAgent",
148148
},
149149
)
150150

0 commit comments

Comments
 (0)