The code is generated by ChatGPT by an initial HTTP request sent from Unity, if ChatGPT generates the code successfully then a HTTP response is received and parsed in Unity which extracts the source code from the markdown.