naman1102 commited on
Commit
b1d2431
·
1 Parent(s): 9450587

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +3 -0
tools.py CHANGED
@@ -14,8 +14,11 @@ from langchain_community.document_loaders import WikipediaLoader, ArxivLoader
14
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
15
 
16
 
 
 
17
  def safe_tool_execution(tool_func):
18
  """Decorator to ensure tools always return a useful response."""
 
19
  def wrapper(*args, **kwargs):
20
  try:
21
  result = tool_func(*args, **kwargs)
 
14
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
15
 
16
 
17
+ import functools
18
+
19
  def safe_tool_execution(tool_func):
20
  """Decorator to ensure tools always return a useful response."""
21
+ @functools.wraps(tool_func)
22
  def wrapper(*args, **kwargs):
23
  try:
24
  result = tool_func(*args, **kwargs)