From d794b9fb3784bfb3ecbe989a464320699f07c2b8 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Thu, 19 Dec 2024 08:07:54 +0530 Subject: [PATCH] fix incorrect use of agent_id in events --- agentops/partners/taskweaver_event_handler.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/agentops/partners/taskweaver_event_handler.py b/agentops/partners/taskweaver_event_handler.py index 1ed70856..2b2b94c7 100755 --- a/agentops/partners/taskweaver_event_handler.py +++ b/agentops/partners/taskweaver_event_handler.py @@ -57,9 +57,9 @@ def handle_post(self, type: PostEventType, msg: str, extra: Any, post_id: str, r params={ "post_id": post_id, "round_id": round_id, + "agent_id": agent_id, }, returns=msg, - agent_id=agent_id, ) ) @@ -102,8 +102,8 @@ def handle_post(self, type: PostEventType, msg: str, extra: Any, post_id: str, r "attachment_type": str(attachment_type), "post_id": post_id, "round_id": round_id, + "agent_id": agent_id, }, - agent_id=agent_id, ) ) @@ -131,7 +131,6 @@ def handle_post(self, type: PostEventType, msg: str, extra: Any, post_id: str, r error_type="post_error", details=msg, logs={"post_id": post_id, "round_id": round_id}, - agent_id=agent_id, ) ) @@ -139,9 +138,12 @@ def handle_post(self, type: PostEventType, msg: str, extra: Any, post_id: str, r agentops.record( agentops.ActionEvent( action_type="post_end", - params={"post_id": post_id, "round_id": round_id}, + params={ + "post_id": post_id, + "round_id": round_id, + "agent_id": agent_id + }, returns=msg, - agent_id=agent_id, ) )