Skip to content

Commit

Permalink
fix: be more specific about the current directory when listing files
Browse files Browse the repository at this point in the history
  • Loading branch information
thedadams committed Jun 24, 2024
1 parent d85b623 commit 934a3d0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_gptscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ async def process_event(r: Run, frame: CallFrame | RunFrame | PromptFrame):
for output in frame.output:
event_content += output.content

tool = ToolDef(tools=["sys.exec"], instructions="List the files in the current directory.")
tool = ToolDef(tools=["sys.exec"], instructions="List the files in the current directory as '.'.")
out = await gptscript.evaluate(tool,
Options(confirm=True, disableCache=True),
event_handlers=[process_event],
Expand Down Expand Up @@ -430,8 +430,9 @@ async def process_event(r: Run, frame: CallFrame | RunFrame | PromptFrame):
for output in frame.output:
event_content += output.content

tool = ToolDef(tools=["sys.exec"], instructions="List the files in the current directory. If that doesn't work"
"print the word FAIL.")
tool = ToolDef(tools=["sys.exec"],
instructions="List the files in the current directory as '.'. If that doesn't work"
"print the word FAIL.")
out = await gptscript.evaluate(tool,
Options(confirm=True, disableCache=True),
event_handlers=[process_event],
Expand Down

0 comments on commit 934a3d0

Please sign in to comment.