The notebook format on disk is simple JSON that can easily be consumed by other code, supports version control, parameters like temp/etc.
It even has experimental (initial) support for LLaMa/other local models. And it can run the remote models (GPT-*) on web (https://vscode.dev / https://github.dev)!
Search "LLM Book" in vscode extension page or just follow the link: https://marketplace.visualstudio.com/items?itemName=jaaxxx.l...
(Technically not "ChatGPT" as it's the paid API powered model, but this way is far more powerful in my experience and you pay pennies. That said the endpoint can be configured to talk to any OpenAI-like endpoint.)
Happy to talk issues/feature requests at https://github.com/JacksonKearl/ai-book