Open anmol-aidora opened 1 week ago
Never import agentops before importing crewai classes.
Inside crewai crew.py, agent.py, tool_usage.py, etc, they are importing autogen by checking the variable:
agentops = None
if os.environ.get("AGENTOPS_API_KEY"):
try:
import agentops
except ImportError:
pass
If you import autogen
and do autogen.init()
before importing any of crewAI's Crew, Agent, Tool class, your agentops
variable will reset and the agentops.init()
session will be lost. The system then fails silently and you are left scratching your head why your LLM is not responding.
While this is a temporary solution, I have still not figured out how to make sure there is some error message when this happens, and ideally it shouldn't happen at all. So not closing this issue.
Description
When I am using agentops, CrewAI Crew.kickoff returns the LLM response to be None, i.e. fails silently.
Steps to Reproduce
Output:
Expected behavior
If there is an error, it should be notified. It should not fail silently.
Ideally, this should not happen at all, and the kickoff function call should return a proper CrewResponse with LLM completion.
Screenshots/Code snippets
Operating System
Ubuntu 20.04
Python Version
3.12
crewAI Version
0.51.1
crewAI Tools Version
0.12.0
Virtual Environment
Poetry
Evidence
Run this code:
Possible Solution
NA
Additional context
NA