ChatGPT
To finalize the discussion of TextWorld, let’s try a different approach — using LLMs. Right after public release at the end of 2022, OpenAI ChatGPT became very popular and literally transformed the chatbot and text-based assistant landscape. Just in a year since its release, hundreds of new use cases appeared and thousands of applications using LLMs under the hood were developed. Let’s try to apply this technology to our problem of solving TextWorld games.
Setup
First, you will need an account on https://openai.com. We’ll start our experiment with an interactive web-based chat, which could be tried for free and without registration (at the moment of writing), but our next example will use the ChatGPT API, for which you will need to generate an API key at https://platform.openai.com. Once the key is created, you need to set it to the environment variable OPENAI_API_KEY in the shell you’re using.
We’...