Update crew.py
Browse files
crew.py
CHANGED
@@ -29,36 +29,13 @@ PHOENIX_API_KEY = os.environ["PHOENIX_API_KEY"]
|
|
29 |
os.environ["PHOENIX_CLIENT_HEADERS"] = f"api_key={PHOENIX_API_KEY}"
|
30 |
os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "https://app.phoenix.arize.com"
|
31 |
|
32 |
-
#tracer_provider = register(
|
33 |
-
# auto_instrument=True,
|
34 |
-
# project_name="gaia"
|
35 |
-
#)
|
36 |
-
|
37 |
-
#CrewAIInstrumentor().instrument(tracer_provider=tracer_provider)
|
38 |
-
|
39 |
-
###
|
40 |
-
# Import Arize OTel registration
|
41 |
-
from arize.otel import register
|
42 |
-
|
43 |
-
# Import OpenInference instrumentors, use either Langchain or LiteLLM
|
44 |
-
from openinference.instrumentation.crewai import CrewAIInstrumentor
|
45 |
-
#from openinference.instrumentation.langchain import LangChainInstrumentor
|
46 |
-
#from openinference.instrumentation.litellm import LiteLLMInstrumentor
|
47 |
-
|
48 |
tracer_provider = register(
|
49 |
-
|
50 |
-
|
51 |
-
project_name = "gaia"
|
52 |
)
|
53 |
|
54 |
CrewAIInstrumentor().instrument(tracer_provider=tracer_provider)
|
55 |
|
56 |
-
# Instrument the underlying LLM call handler (e.g., LangChain)
|
57 |
-
#LangChainInstrumentor().instrument(tracer_provider=tracer_provider)
|
58 |
-
# If using LiteLLM directly via a newer CrewAI version for model calls:
|
59 |
-
#LiteLLMInstrumentor().instrument(tracer_provider=tracer_provider)
|
60 |
-
###
|
61 |
-
|
62 |
@CrewBase
|
63 |
class GAIACrew():
|
64 |
agents: List[BaseAgent]
|
|
|
29 |
os.environ["PHOENIX_CLIENT_HEADERS"] = f"api_key={PHOENIX_API_KEY}"
|
30 |
os.environ["PHOENIX_COLLECTOR_ENDPOINT"] = "https://app.phoenix.arize.com"
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
tracer_provider = register(
|
33 |
+
auto_instrument=True,
|
34 |
+
project_name="gaia"
|
|
|
35 |
)
|
36 |
|
37 |
CrewAIInstrumentor().instrument(tracer_provider=tracer_provider)
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
@CrewBase
|
40 |
class GAIACrew():
|
41 |
agents: List[BaseAgent]
|