Skip to content

Commit

Permalink
fix: check for metadata in prompt test
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Aug 20, 2024
1 parent 34f7d40 commit 0c33b07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_gptscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@ async def process_event(r: Run, frame: CallFrame | RunFrame | PromptFrame):
prompt_event_found = True
assert len(frame.fields) == 1, "Unexpected number of fields: " + str(frame.fields)
assert "first name" in frame.fields[0], "Unexpected field: " + frame.fields[0]
assert "first_name" in frame.metadata, "Unexpected metadata: " + str(frame.metadata)
assert frame.metadata["first_name"] == "Clicky", "Unexpected metadata: " + str(frame.metadata)
await gptscript.prompt(PromptResponse(frame.id, {frame.fields[0]: "Clicky"}))

out = await gptscript.run(
Expand Down

0 comments on commit 0c33b07

Please sign in to comment.