making new string and list classes that call gpt3 under the hood so you can access elements beyond the final one. no more index errors!
— shb (@himbodhisattva) December 24, 2022
Some ideas are dumb enough you just have to try them, so I introduce to you the Python library: Infinite AI Array. Let’s see it in action…
$ pip install git+https://github.com/ianb/infinite-ai-array.git
$ export OPENAI_API_KEY=sk-...
$ python
>>> from iaia import InfiniteAIArray, InfiniteAIDict
>>> primes = InfiniteAIArray()
>>> primes[:10]
[2, 3, 5, 7, 11, 13, 17, 19, 23, 29]
>>> minnesota_cities = InfiniteAIArray()
>>> city_populations = InfiniteAIDict()
>>> for i, city in enumerate(minnesota_cities[:6]):
... print(f"{i+1:>2}. {city:<20} {city_populations[city