Skip to content

Agentic retry for python syntax errors #28

Description

@jeremyfowers

It is fairly common for game generation to fail due to a minor Python syntax error.

We could try to get past this with a control flow like:

  1. Attempt to generate the game based on the users prompt
  2. If there's a failure, get the stack trace from the pygame subprocess stdout/stderr
  3. Invoke the LLM again with system message "The following Python code has an error. Output a single Python code block that fixes the error. Make no other adjustments. Error: ERROR; Code: CODE."
  4. Replace the existing game in the library with the new game that was generated.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions