mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-23 16:54:56 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
bc8fde8771
commit
47c68f06f2
7 changed files with 78 additions and 49 deletions
|
|
@ -1,8 +1,10 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
|
||||
from smolagents import tool
|
||||
|
||||
|
||||
@tool
|
||||
def read_file(file_path: str) -> str:
|
||||
"""
|
||||
|
|
@ -19,6 +21,7 @@ def read_file(file_path: str) -> str:
|
|||
print(content)
|
||||
return content
|
||||
|
||||
|
||||
@tool
|
||||
def write_file(file_path: str, content: str) -> str:
|
||||
"""
|
||||
|
|
@ -36,6 +39,7 @@ def write_file(file_path: str, content: str) -> str:
|
|||
f.write(content)
|
||||
return f"Content written to {file_path}"
|
||||
|
||||
|
||||
@tool
|
||||
def append_to_file(file_path: str, content: str) -> str:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue