From b37ab5e837c86e0986b73552a4f9c7462a01aca6 Mon Sep 17 00:00:00 2001 From: anmol-aidora Date: Fri, 13 Sep 2024 02:51:04 +0530 Subject: [PATCH] Added is_auto_end flag in agentops.end session in crew.py 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 --- src/crewai/crew.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/crewai/crew.py b/src/crewai/crew.py index fff2c3a85..bf3fc1d24 100644 --- a/src/crewai/crew.py +++ b/src/crewai/crew.py @@ -915,6 +915,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)