wasp icon indicating copy to clipboard operation
wasp copied to clipboard

Mage produces files in one line

Open infomiho opened this issue 4 months ago • 1 comments

If you look at this example: https://usemage.ai/result/fc653a34-09a9-4ab0-b7c2-5bfdf6ac149b

Screenshot 2024-03-07 at 10 58 44
You'll notice the some of the files are generated on one line

We suspect it has to do with OpenAI changing their models.

Possible solution

We should upgrade our setup to account for that mistake since we already a fixing step in our app generation pipeline, it shouldn't be too hard.

infomiho avatar Mar 07 '24 09:03 infomiho

We already updated prompts to handle this, and it seemed solved, but it still occurs sometimes (before it was much worse).

What we can do in our Haskell Wasp AI code is check if there are no newlines in the generated code and if that happens, send it back to GPT for another try.

Martinsos avatar Mar 07 '24 10:03 Martinsos