PYAE1994 commited on
Commit
5e3e553
·
verified ·
1 Parent(s): a6ea1e1

Create tools.py

Browse files
Files changed (1) hide show
  1. app/agent/tools.py +12 -0
app/agent/tools.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ def read_file(path):
4
+ with open(path, "r") as f:
5
+ return f.read()
6
+
7
+ def write_file(path, content):
8
+ with open(path, "w") as f:
9
+ f.write(content)
10
+
11
+ def list_files(path="."):
12
+ return os.listdir(path)