From ec89e003c86b0cceca444be7ae986fa225034a67 Mon Sep 17 00:00:00 2001 From: Anmol Deep Date: Wed, 11 Dec 2024 22:04:17 +0530 Subject: [PATCH] Added is_auto_end flag in agentops.end session in crew.py (#1320) When using agentops, we have the option to pass the `skip_auto_end_session` parameter, which is supposed to not end the session if the `end_session` function is called by Crew. Now the way it works is, the `agentops.end_session` accepts `is_auto_end` flag and crewai should have passed it as `True` (its `False` by default). I have changed the code to pass is_auto_end=True Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com> --- src/crewai/crew.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/crewai/crew.py b/src/crewai/crew.py index 943320ceb..f0a502249 100644 --- a/src/crewai/crew.py +++ b/src/crewai/crew.py @@ -1032,6 +1032,7 @@ class Crew(BaseModel): agentops.end_session( end_state="Success", end_state_reason="Finished Execution", + is_auto_end=True, ) self._telemetry.end_crew(self, final_string_output)