Robert Brennan 8a64d7c912
Fix read and write operations when LLM asks for absolute path (#126)
* fix resolution of filepaths

* fix imports

* Update write.py
2024-03-25 08:53:26 -04:00

8 lines
182 B
Python

from .util import resolve_path
def read(base_path, file_path):
file_path = resolve_path(base_path, file_path)
with open(file_path, 'r') as file:
return file.read()