Added telemetry with langfuse
Browse files
app.py
CHANGED
|
@@ -5,6 +5,12 @@ import inspect
|
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import CodeAgent, InferenceClientModel, DuckDuckGoSearchTool, WikipediaSearchTool, VisitWebpageTool, PythonInterpreterTool, OpenAIServerModel
|
| 7 |
from huggingface_hub import login
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Login to HF
|
| 10 |
login(token=os.getenv("HF_TOKEN"))
|
|
|
|
| 5 |
import pandas as pd
|
| 6 |
from smolagents import CodeAgent, InferenceClientModel, DuckDuckGoSearchTool, WikipediaSearchTool, VisitWebpageTool, PythonInterpreterTool, OpenAIServerModel
|
| 7 |
from huggingface_hub import login
|
| 8 |
+
from langfuse import get_client
|
| 9 |
+
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
| 10 |
+
|
| 11 |
+
# Setup tracking
|
| 12 |
+
langfuse = get_client()
|
| 13 |
+
SmolagentsInstrumentor().instrument()
|
| 14 |
|
| 15 |
# Login to HF
|
| 16 |
login(token=os.getenv("HF_TOKEN"))
|