Skip to content

Commit

Permalink
fix incorrect use of agent_id in events
Browse files Browse the repository at this point in the history
  • Loading branch information
the-praxs committed Dec 19, 2024
1 parent aa877fb commit d794b9f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions agentops/partners/taskweaver_event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
)

Expand Down Expand Up @@ -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,
)
)

Expand Down Expand Up @@ -131,17 +131,19 @@ 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,
)
)

elif type == PostEventType.post_end:
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,
)
)

Expand Down

0 comments on commit d794b9f

Please sign in to comment.