Spaces:
Paused
Paused
Update crew.py
Browse files
crew.py
CHANGED
|
@@ -6,6 +6,7 @@ from crewai_tools import (
|
|
| 6 |
SerperDevTool,
|
| 7 |
WebsiteSearchTool
|
| 8 |
)
|
|
|
|
| 9 |
from phoenix.otel import register
|
| 10 |
|
| 11 |
PHOENIX_API_KEY = os.environ["PHOENIX_API_KEY"]
|
|
@@ -18,23 +19,7 @@ tracer_provider = register(
|
|
| 18 |
project_name="gaia"
|
| 19 |
)
|
| 20 |
|
| 21 |
-
###
|
| 22 |
-
#from opentelemetry import trace
|
| 23 |
-
#from opentelemetry.sdk.trace import TracerProvider
|
| 24 |
-
#from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
| 25 |
-
|
| 26 |
-
from openinference.instrumentation.crewai import CrewAIInstrumentor
|
| 27 |
-
#from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
| 28 |
-
#from opentelemetry.sdk.trace.export import ConsoleSpanExporter, SimpleSpanProcessor
|
| 29 |
-
|
| 30 |
-
#endpoint = "https://app.phoenix.arize.com/v1/traces"
|
| 31 |
-
#tracer_provider = TracerProvider()
|
| 32 |
-
#tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint)))
|
| 33 |
-
|
| 34 |
CrewAIInstrumentor().instrument(tracer_provider=tracer_provider)
|
| 35 |
-
###
|
| 36 |
-
|
| 37 |
-
#agentops.init(os.environ["AGENTOPS_API_KEY"])
|
| 38 |
|
| 39 |
def get_crew():
|
| 40 |
search_tool = SerperDevTool()
|
|
|
|
| 6 |
SerperDevTool,
|
| 7 |
WebsiteSearchTool
|
| 8 |
)
|
| 9 |
+
from openinference.instrumentation.crewai import CrewAIInstrumentor
|
| 10 |
from phoenix.otel import register
|
| 11 |
|
| 12 |
PHOENIX_API_KEY = os.environ["PHOENIX_API_KEY"]
|
|
|
|
| 19 |
project_name="gaia"
|
| 20 |
)
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
CrewAIInstrumentor().instrument(tracer_provider=tracer_provider)
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
def get_crew():
|
| 25 |
search_tool = SerperDevTool()
|