I was trying out the sampling in <ahref="https://github.com/AI-Guru/MMM-JSB">MMM music generation model</a>today and encountered the problem described in <ahref="https://github.com/craffel/pretty-midi/issues/220">this issue Iproposed</a>. I have no experience writing C in python withctypes, so I figured why not ask the magic conchshell ChatGPT?

<p>I’ve asked him several “how to write …” questions since its release,but this was the first time I actually ask him to help me understand asnippet of code so I can proceed to debugging.</p><p>It did pretty good in my first question, as it should do as the SOTALLM model.</p>

<img src=”/images/2023-04-04-First-Time-Debugging-with-ChatGPT/q0.png”alt=”q0” /><figcaption aria-hidden="true">q0</figcaption>
<img src=”/images/2023-04-04-First-Time-Debugging-with-ChatGPT/a0.png”alt=”a0” /><figcaption aria-hidden="true">a0</figcaption>
<p>What strikes me is the context-aware ability it showed in my secondquestion. It is well known it can do so from all the demos, but seeingit actually work with a real example of your own is really a differentstory. Here, I just asked an absolutely arbitrary question andit knew what I was referring to</p>
<img src=”/images/2023-04-04-First-Time-Debugging-with-ChatGPT/q1.png”alt=”q1” /><figcaption aria-hidden="true">q1</figcaption>
<img src=”/images/2023-04-04-First-Time-Debugging-with-ChatGPT/a1.png”alt=”a1” /><figcaption aria-hidden="true">a1</figcaption>
<p>It became mostly clear to me where the bug was, but to make sure</p>
<img src=”/images/2023-04-04-First-Time-Debugging-with-ChatGPT/q2.png”alt=”q2” /><figcaption aria-hidden="true">q2</figcaption>
<img src=”/images/2023-04-04-First-Time-Debugging-with-ChatGPT/a2.png”alt=”a2” /><figcaption aria-hidden="true">a2</figcaption>
<img src=”/images/2023-04-04-First-Time-Debugging-with-ChatGPT/q3.png”alt=”q3” /><figcaption aria-hidden="true">q3</figcaption>
<img src=”/images/2023-04-04-First-Time-Debugging-with-ChatGPT/a3.png”alt=”a3” /><figcaption aria-hidden="true">a3</figcaption>
<p>At last, I conveniently asked it how to fix this bug</p>
<img src=”/images/2023-04-04-First-Time-Debugging-with-ChatGPT/q4.png”alt=”q4” /><figcaption aria-hidden="true">q4</figcaption>
<img src=”/images/2023-04-04-First-Time-Debugging-with-ChatGPT/a4.png”alt=”a4” /><figcaption aria-hidden="true">a4</figcaption>