Skip to content

Commit

Permalink
Fixed Tool.run after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antoninoLorenzo committed Aug 11, 2024
1 parent bf6c119 commit ed9e083
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/agent/tools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def load_tool(path: str):
def run(*args):
"""Execute a tool"""
if not isinstance(args[0], str):
raise ValueError(f'Argument must be a string found {type(args[0])}')
raise TypeError(f'Argument must be a string found {type(args[0])}.')
elif len(args[0]) == 0:
raise ValueError(f'String is empty.')

command = args[0].encode('utf-8').decode('utf-8')
arguments = command.split()
Expand Down

0 comments on commit ed9e083

Please sign in to comment.