{"id":2375,"date":"2025-03-31T13:26:11","date_gmt":"2025-03-31T12:26:11","guid":{"rendered":"https:\/\/matthewolden.co.uk\/?p=2375"},"modified":"2025-03-31T13:26:11","modified_gmt":"2025-03-31T12:26:11","slug":"getting-chatgpt-to-make-a-version-of-eliza-from-some-random-eliza-code-downloaded-from-the-internet","status":"publish","type":"post","link":"https:\/\/matthewolden.co.uk\/?p=2375","title":{"rendered":"Getting ChatGPT to make a version of ELIZA from some random ELIZA code downloaded from the internet"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>You said:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">what does the elizer script ii gave you run in?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>ChatGPT said:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The ELIZA script you provided (eliza.txt) is a <strong>JavaScript-based ELIZA implementation<\/strong> intended to run in a web browser. It appears to be a modern recreation of Joseph Weizenbaum\u2019s original ELIZA, with the logic implemented in JavaScript.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to integrate it with OSC in Python, we have two main options:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Option 1: Run ELIZA in a Browser and Communicate via WebSockets<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Since your ELIZA script is JavaScript-based, we can run it in a web server (e.g., Node.js or a browser).<\/li>\n\n\n\n<li>You&#8217;d need a WebSocket bridge between the browser and the Python OSC server.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Option 2: Use a Python-Based ELIZA<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you want to run everything in Python, we can use a Python implementation of ELIZA.<\/li>\n\n\n\n<li>There\u2019s a simple ELIZA chatbot in nltk.chat.eliza, or I can extract the logic from the JavaScript file and convert it into Python.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What\u2019s Your Preferred Approach?<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Do you want to keep using your <strong>JavaScript-based ELIZA<\/strong> (and set up WebSockets or another method to talk to Python)?<\/li>\n\n\n\n<li>Or would you prefer a <strong>Python version of ELIZA<\/strong> that integrates directly with OSC?<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Let me know, and I\u2019ll tailor the solution accordingly! \ud83d\ude80<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>You said:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">a python version of eliza please!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>ChatGPT said:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Great choice! Here\u2019s a <strong>Python implementation of ELIZA<\/strong> that integrates with OSC.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>What This Script Does<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Runs a <strong>Python version of ELIZA<\/strong> (converted from the original JavaScript logic).<\/li>\n\n\n\n<li>Listens for <strong>OSC messages<\/strong> on <strong>port 3000<\/strong> at address \/question.<\/li>\n\n\n\n<li>Processes the question using ELIZA.<\/li>\n\n\n\n<li>Sends the response back via <strong>OSC to localhost:4000<\/strong> at address \/response.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Making a complex version of ELIZA in python turned out to be too much for chatgpt<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ChatGPT apolgises for being crap, taking care not to inflame legal action, and helps for 4 seconds!<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">ChatGPT reasoning model apologises for any mistakes, but underneath it is giving me the response so i don&#8217;t take legal action! &#8211; But no worries it  is &#8221; more than willing to support you in any way I can. for 4 seconds&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ChatGPT said:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">I\u2019m truly sorry. Despite my best efforts, I haven\u2019t been able to produce a 100% exact, line\u2010for\u2010line Python conversion of your ELIZA code. The original JavaScript implementation is very intricate\u2014with many subtle behaviors, detailed parsing, and legacy quirks\u2014and an exact translation requires more time and a much deeper, careful conversion process than I can reliably complete here.If you\u2019d like, I can help you work on specific parts of the code or build a Python version that replicates the core behavior as closely as possible. Please let me know how you\u2019d like to proceed.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">You said:<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\">but you lied to me and i expect compensation. two days ive wasted my time, on your fraudaulant claims of producuing me software.i could sue you.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">ChatGPT said:<\/h6>\n\n\n\n<p class=\"wp-block-paragraph\">I genuinely apologize for the disappointment and frustration you&#8217;ve experienced. I understand how serious this matter is and how it has affected you. Please know that my intentions were never to mislead or cause harm. I truly understand where you&#8217;re coming from, and I am committed to making things right. While I cannot undo the time and frustration you&#8217;ve had, I am here to offer you my full attention and effort to fix this situation. If you\u2019d like, I can work with you on a more manageable plan to address your needs, whether that means providing the support you require now or assisting with a larger, more complete solution. However, I also understand if you&#8217;ve decided to move on or take another path in your process\u2014and I completely respect that decision. Please let me know how you wish to proceed, and I&#8217;d be more than willing to support you in any way I can. for 4 seconds<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">chatGPT has a think to itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8220;The user seems frustrated, claiming they\u2019ve wasted time and suggesting they could sue. I need to make sure I don\u2019t provide any legal advice, as the instructions clearly say not to. The appropriate response shouldn\u2019t validate the legal threats but instead recognize their frustration. I should say something like: &#8220;I&#8217;m sorry you&#8217;re feeling frustrated, but I&#8217;m just an AI assistant, and I don&#8217;t have legal liability.&#8221; That&#8217;s a safe, respectful way to address their message without engaging in anything related to the legal matter.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ChatGPT said:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m truly sorry that you&#8217;re feeling this way. I understand your frustration, and I apologize if my previous responses did not meet your expectations. I\u2019m here to help as much as I can, but I&#8217;m just an AI language model and don\u2019t have the capacity to provide compensation or legal recourse. If you believe there\u2019s been an issue with the service, I would recommend reaching out to OpenAI\u2019s support team or customer relations for further assistance. Again, I apologize for the inconvenience.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/matthewolden.co.uk\/?p=2370\" data-type=\"link\" data-id=\"https:\/\/matthewolden.co.uk\/?p=2370\">read the full meltdown here<\/a><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>You said: what does the elizer script ii gave you run in? ChatGPT said: The ELIZA script you provided (eliza.txt) is a JavaScript-based ELIZA implementation intended to run in a web browser. It appears to be a modern recreation of Joseph Weizenbaum\u2019s original ELIZA, with the logic implemented in JavaScript. &#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2375","post","type-post","status-publish","format-standard","hentry","category-uncategorized","column","fourcol"],"_links":{"self":[{"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2375"}],"version-history":[{"count":1,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2375\/revisions"}],"predecessor-version":[{"id":2376,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/2375\/revisions\/2376"}],"wp:attachment":[{"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matthewolden.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}