Skip to content

Commit 934a3d0

Browse files
committed
fix: be more specific about the current directory when listing files
1 parent d85b623 commit 934a3d0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_gptscript.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ async def process_event(r: Run, frame: CallFrame | RunFrame | PromptFrame):
394394
for output in frame.output:
395395
event_content += output.content
396396

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

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

0 commit comments

Comments
 (0)