Files
OpenHands/opendevin/lib/actions/write.py
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

9 lines
209 B
Python

from .util import resolve_path
def write(base_path, file_path, contents):
file_path = resolve_path(base_path, file_path)
with open(file_path, 'w') as file:
file.write(contents)
return ""