How to convert 1 code text file to fine-tune's desired format?

I want to give the code text to chatgpt to learn, and then I can ask him questions to understand the code quickly, because I want to send the whole project code to chatgpt, so I can’t go through the normal Q&A chat window.

But I’m not sure how to convert the code text to the format fine-tune needs:
{“prompt”:“”, “completion”:“”}