dmfelder commited on
Commit
83d8da8
·
verified ·
1 Parent(s): 5836295

Update tools/execute_python_code_from_file.py

Browse files
tools/execute_python_code_from_file.py CHANGED
@@ -8,11 +8,13 @@ from tools.load_file import load_file
8
  @tool("execute_python_code_from_file_tool", parse_docstring=True)
9
  def execute_python_code_from_file(path_or_url: str) -> str:
10
  """
11
- Executes a given Python code snippet.
 
12
  Args:
13
- path_or_url (str): A string containing the Python code to execute.
 
14
  Returns:
15
- str: The standard output resulting from the execution of the code.
16
  """
17
  logger.info(f"execute_python_code_from_file with param: {path_or_url}")
18
  code = load_file(path_or_url).read().decode("utf-8")
 
8
  @tool("execute_python_code_from_file_tool", parse_docstring=True)
9
  def execute_python_code_from_file(path_or_url: str) -> str:
10
  """
11
+ Executes a Python script provided as a file path or URL.
12
+
13
  Args:
14
+ path_or_url (str): A local file path or URL pointing to a Python script.
15
+
16
  Returns:
17
+ str: The standard output from executing the Python code.
18
  """
19
  logger.info(f"execute_python_code_from_file with param: {path_or_url}")
20
  code = load_file(path_or_url).read().decode("utf-8")