How to remove extra text before and after valid JSON in Make when using the OpenAI ChatGPT module?

If you use the OpenAI ChatGPT Make module, you may sometimes get LLM output with extra text before and after the valid JSON.
Here’s a good Regex module you can use to remove all unwanted text: Text parser - Help Center

Pattern: ({[\s\S]*})

1 Like