How to add js to duplicate functionality of Elizabot within a tiddler

I want to duplicate a simple/basic Eliza bot (https://www.masswerk.at/elizabot/). Towards the bottom of the page is a zip file that contains some javascript.

I run my TiddlyWiki from a local file. I naively tried to copy the page source and paste it as HTML inside a Tiddler, but the console showed some error relating to being sandboxed. I tried embedding an iframe but got a same-origin error displaying the page.

Clearly I am out of my depth. Can someone point me to a tutorial or tell me how to make an ‘Eliza bot’ Tiddler? If it can’t be done, all good.

For a bigger picture view, there is a concept of ‘rubber ducking’, where you talk through a problem with a ‘rubber duck’. So I want a ‘Talk to the Duck’ Tiddler, and I was going to hack the Eliza code to be more ‘rubber duck’ like (see here for an example of a ‘Talk to the Duck’ webpage: Rubber Duck Debugging – Debugging software with a rubber ducky).

Anyway, any pointers appreciated.

Tryout Release v0.8.1-prerelease6 · tiddly-gittly/TidGi-Desktop · GitHub

It has a local LLM on the sidebar (TG AI in sidebar), user manual is here https://tidgi.fun/#TidGi%20Feature%20Handbook%2FLocalized%20AI%20Copilot