ZeroTimo commited on
Commit
9b6ad5a
·
verified ·
1 Parent(s): 690538b

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +5 -9
agent.py CHANGED
@@ -27,19 +27,15 @@ try:
27
  except ImportError:
28
  from langchain.tools.python.tool import PythonAstREPLTool
29
 
30
- # Optional: LangSmith Tracing
31
- try:
32
- from langchain_community.tracing import configure_langsmith
33
- except ImportError:
34
- configure_langsmith = None
35
-
36
  # ---------------------------------------------------------------------
37
  # 0) Optionale LangSmith-Tracing (setze ENV: LANGCHAIN_API_KEY)
38
  # ---------------------------------------------------------------------
 
39
  if os.getenv("LANGCHAIN_API_KEY"):
40
- os.environ.setdefault("LANGCHAIN_TRACING_V2", "true")
41
- from langchain_community.utils import configure_langsmith
42
- configure_langsmith(project_name="gaia-agent")
 
43
 
44
  # ---------------------------------------------------------------------
45
  # 1) Helfer: Fehler-Decorator + Backoff-Wrapper
 
27
  except ImportError:
28
  from langchain.tools.python.tool import PythonAstREPLTool
29
 
 
 
 
 
 
 
30
  # ---------------------------------------------------------------------
31
  # 0) Optionale LangSmith-Tracing (setze ENV: LANGCHAIN_API_KEY)
32
  # ---------------------------------------------------------------------
33
+
34
  if os.getenv("LANGCHAIN_API_KEY"):
35
+ os.environ["LANGCHAIN_TRACING_V2"] = "true"
36
+ os.environ["LANGCHAIN_ENDPOINT"] = "https://api.smith.langchain.com"
37
+ os.environ.setdefault("LANGCHAIN_PROJECT", "gaia-agent")
38
+ print("📡 LangSmith tracing enabled.")
39
 
40
  # ---------------------------------------------------------------------
41
  # 1) Helfer: Fehler-Decorator + Backoff-Wrapper