Spaces:
Configuration error
Configuration error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
from openai import OpenAI
|
|
|
|
| 4 |
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
| 5 |
from phoenix.otel import register
|
| 6 |
from smolagents import (
|
|
@@ -21,6 +22,7 @@ def run_agent(question, file_name):
|
|
| 21 |
endpoint = "https://app.phoenix.arize.com/v1/traces"
|
| 22 |
)
|
| 23 |
|
|
|
|
| 24 |
SmolagentsInstrumentor().instrument(tracer_provider = tracer_provider)
|
| 25 |
|
| 26 |
agent = CodeAgent(
|
|
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
from openai import OpenAI
|
| 4 |
+
from openinference.instrumentation.openai import OpenAIInstrumentor
|
| 5 |
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
| 6 |
from phoenix.otel import register
|
| 7 |
from smolagents import (
|
|
|
|
| 22 |
endpoint = "https://app.phoenix.arize.com/v1/traces"
|
| 23 |
)
|
| 24 |
|
| 25 |
+
OpenAIInstrumentor().instrument(tracer_provider = tracer_provider)
|
| 26 |
SmolagentsInstrumentor().instrument(tracer_provider = tracer_provider)
|
| 27 |
|
| 28 |
agent = CodeAgent(
|