Python SDK for agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks like CrewAI, Langchain, and Autogen
🔎 Describe the Bug
If you start up an agentops client with instrument_llm_calls false and stop_instrumenting() gets called, whether implicitly via Crew/Autogen or explicitly by the caller, client.py will try to reference an undefined self.llm_tracker member and throw. (Even though it is checked for truthiness, only getattr/hasattr will work when the value isn't set at all)
The fix is to explicitly set llm_tracker to None in the constructor, which will make the check later work properly with a falsy value. I will submit a fix.
🐛 Bug Report
🔎 Describe the Bug If you start up an agentops client with instrument_llm_calls false and stop_instrumenting() gets called, whether implicitly via Crew/Autogen or explicitly by the caller, client.py will try to reference an undefined self.llm_tracker member and throw. (Even though it is checked for truthiness, only getattr/hasattr will work when the value isn't set at all)
The fix is to explicitly set llm_tracker to None in the constructor, which will make the check later work properly with a falsy value. I will submit a fix.