When I request a table in markdown, the result is indeed a nice table in Markdown.
The renderer (in my case “markdown-it”: “^14.0.0”) cannot render it because GPT places the markdown between code block fences (```).
I tried to fix it by disabling the fence option (.disable(‘fence’) but this results in a nice table but also in the codeblock fence being rendered
Did someone come across the same issue and found a fix or workaround?
That’s actually undesired AI production, not what would be expected.
The AI might have decided that you wanted a table that you could use elsewhere, and not a table that you wanted to see, depending on how you asked for markdown.
If you just ask for table (and I’ve found it better to go by columns and rows in specification) it should still be markdown.
Testing to see if gpt-4-1106 misbehaves — works as expected.
Tx, I will test this. My challenge is that it is an enduser that will request the table. I will probably have to explain in the system prompt that tables should be send as rows and columns
I think it very unlikely to have markdown blocks inside of tables… not saying that’s not going to happen, you could have a bit of logic that looks for the ``` and then checks for table markers, something that would not filter the backticks if there is no table markers found until the closing set of ```'s perhaps?