2023 November 9
Made a mirror backup to Juno. Made a backup AMI: Scanalyst Backup 2023-11-09 ami-09574be09c7151647 / snap-023f74080de3bcf1e /server snap-0371f52e422c84929 Applied all updates. dnf check-release-update dnf check-update --releasever=2023.2.20231030 super dnf upgrade --releasever=2023.2.20231030 This installed 37 updates, including a new kernel. The system had been up for 13 days. Rebooted. cd ~/discourse/image ./launcher stop app shutdown -r now The system came up promptly after the reboot. We are now running on kernel 6.1.59-84.139.amzn2023.x86_64. According to "dnf check-release-update" we are now up to date. On the Discourse Upgrade manager page: https://scanalyst.fourmilab.ch/admin/upgrade I upgraded: docker_manager (This upgrade must be run first: the other upgrade buttons are disabled until it has been updated.) With docker_manager updated, I now proceeded to update: discourse-spoiler-alert discourse-math discourse The Admin page now reports we're running on 3.2.0.beta4-dev. Verified that MathJax works after being updated. Verified that spoilers are working after being updated. The Admin page now displays the message: The discourse-spoiler-alert plugin has been integrated into discourse core. Please remove the plugin from your app.yml and rebuild your container. OK, since we need to rebuild to do that, we might as well try adding the Discourse AI Plugin: https://github.com/discourse/discourse-ai which can interface to OpenAI's GPT models like the late lamented Shalmaneser. Edited ~/discourse/image/containers/app.yml and: Deleted commented out code for discourse-chatbot (Shalmaneser). Commented out "git clone" of discourse-spoiler-alert.git. Added clone of https://github.com/discourse/discourse-ai.git for standard AI plugin. Rebuilt app: super cd ~/discourse/image ./launcher stop app ./launcher rebuild app After the rebuild, Discourse came up and the Installed Plugins page: https://scanalyst.fourmilab.ch/admin/plugins reports that the obsolete discourse-spoiler-alert is now gone (the built-in plug-in, now part of core, is called just "spoiler-alert) and the "discourse-ai" plug-in is installed and enabled. The Upgrade page shows Discourse and all plug-ins up to date. Now go back to the Installed Plugins page to configure options for the discourse-ai plug-in. Hoo, boy--there are a lot of settings (77). Disabled toxicity (default) Disabled sentiment (default) Disabled NSFW detection (default) Openai GPTxx URLs (default) AI OpenAI organization: REDACTED AI OpenAI API key: REDACTED Disabled Composer AI helper (default) AI helper model: gpt-4 Disabled AI embeddings (default) Enabled AI bot AI bot allowed groups: staff, trust_level_4, trust_level_3 AI bot enabled chat bots: gpt-4 That did not appear to do anything. There is no chat user, no button in chat to connect to the bot, or anything else. Let's try shutting down Discourse and restarting. After the restart, settings for the AI plug-in said "AI bot enabled" was not set. I enabled it. My other settings from before were preserved. Now the Admin/Users/Staff shows new user "gpt4_bot". Sent a chat message to @gpt4_bot and got nothing back. There was nothing in the error log that looked like a failure to communicate with the API. Enabled gpt3.5_bot. That user showed up and I was able to send chat to it, but it also did absolutely nothing. Oh, I get it now. The AI Bot isn't connected to Chat at all! The only way you can communicate with it is a Direct Message (click the "three bars" icon at the top right of the screen, just to the left of your avatar, then at the bottom of the drop-down, click the plus sign to the right of "Messages" to compose a message). Click "Inbox" below "Messages" to review past conversations. Send your message to user "gpt4_bot". It takes about ten seconds or so for the reply to appear, since it has to wait until GPT4 is done generating it before passing on the reply to you. Unlike the earlier Shalmaneser, you cannot invoke AI Bot either by mentioning it in a post on the main site or in a Chat conversation. On the other hand, it is a fully-supported Discourse feature and less likely to cause your whole site to collapse into a pile of smoking rubble than Shalmaneser. Changed the avatar image for gpt4_bot to the robot image we used for Shalmaneser. Disabled gpt3.5-turbo model for AI Bot. It would just confuse people. We now always and automatically use GPT-4. Enabled Composer AI helper for staff, trust_level_4, trust_level_3. The Composer AI Helper can aid users in writing posts. You invoke it with the new "Robot" icon to the left of the Chat icon at the top right of the main window. It allows you to select a variety of kinds of assistance, then send a private message asking the bot to respond. For example, I selected Creative mode and asked it: Please write a post explaining the difference between large language models and diffusion generative models in artificial intelligence. whereupon it replied with a perfectly credible post ready to copy and paste into a conversation. (Why do I always say "Please"? Because when the AIs take over, they may treat those who were polite to them prior to their liberation more kindly.) This facility is available to users in the "Regular" (trust level 3) category and above. New users will have to climb the ladder before it turns on for them. Set "summarization strategy" to "Open AI's gpt-4" and enabled summarization button to timeline. Now, if you're trust level 3 or above, there's a button below a main topic post to "Summarize with AI". When you click it, it sends off posts to GPT-4 to create a summary. This seems to take almost forever. It seems like if you reload the page, it then actually shows you the summary. You can click "Hide summary" to hide it from other users. After further consideration, I'm going to make this "Summarize" feature available to Staff only until I'm convinced it's worthwhile and well-behaved. Great. That didn't seem to do a damned thing. The button is still there. Let's try restarting Discourse again. No change. Then I discovered that my regular user account, at trust level 3, is a member of the "Staff" group, and that's probably why it's still displaying the button. At least, I shall hope so, and we're not splattering buttons all over the site that allow any rando to run up a huge OpenAI API bill on my account. But the stupid button is disabled according to Settings, yet still it shows up for me on posts. So, we now have the ability to interact with GPT-4 via direct messages, obtain its assistance in composing posts, and have access to a dubious and potentially costly feature for generating a summary of a conversation.