AxTidy3D_generate_code
Generate executable Python code for Tidy3D FDTD and mode-solving simulations from a natural language problem description. Fixes failed code when given the previous code and error.
Instructions
Generate Python code for a Tidy3D simulation (FDTD, mode solving) from a natural language problem description. Returns executable code and an explanation. The code must be run separately using execute_code. If a previous attempt failed, pass previous_code and previous_error so the generator can fix it instead of starting over.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| previous_code | No | The code from a prior failed attempt, if retrying | |
| previous_error | No | The error message from the prior failed attempt, if retrying | |
| problem_description | Yes | Natural language description of the simulation to build |