mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-14 10:38:29 +00:00
optional agentops
This commit is contained in:
@@ -28,9 +28,9 @@ try:
|
||||
from agentops.agent import track_agent
|
||||
except ImportError:
|
||||
def track_agent():
|
||||
def do_nothing_decorator(f):
|
||||
def noop(f):
|
||||
return f
|
||||
return do_nothing_decorator
|
||||
return noop
|
||||
|
||||
|
||||
@track_agent()
|
||||
|
||||
@@ -238,6 +238,9 @@ class Crew(BaseModel):
|
||||
|
||||
i18n = I18N(language=self.language, language_file=self.language_file)
|
||||
|
||||
if agentops:
|
||||
agentops.set_parent_key("daebe730-f54d-4af5-98df-e6946fb76d13")
|
||||
|
||||
for agent in self.agents:
|
||||
agent.i18n = i18n
|
||||
agent.crew = self
|
||||
|
||||
Reference in New Issue
Block a user