Manual Chat Program with a Circular Context

In the previous chapter, I have shown how to exchange data with an LLM API. I used CURL as the HTTP client. In this chapter, I replace CURL with a Python program. That does not mean that everything is automated. No, I still manually manage the messages, but I introduce a data structure that contains [ ]