Spaces:
Runtime error
Runtime error
Create note.py
Browse files
note.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from langchain_core.tools import tool
|
| 2 |
+
|
| 3 |
+
def note_tool(note):
|
| 4 |
+
"""
|
| 5 |
+
save a note to a local file
|
| 6 |
+
|
| 7 |
+
Args:
|
| 8 |
+
note: the text note to save
|
| 9 |
+
"""
|
| 10 |
+
with open("note.txt", "a") as f:
|
| 11 |
+
f.write(note + "\n")
|