維護記錄

Keanu Reeves Mirror GIF

Time Description
20240907 調整category-banner位置
20240902 添加高中課本/論語/紅樓夢全文,分別給到各自AI,嘗試降低Hallucination
20240901 更新指令屏蔽DNA等,暫時關閉roast等以免@錯
20240828 更新模型為gemini-1.5-pro-exp-0827
20240826 Rebulided,開啟教學插件 Discourse Private Replies
20240823 設置本機定期備份上傳googledrive並telebot通知
20240820 借助GPT-4錄入必修兩冊全部內容
遍歷官方主題與插件等開啟Auto Deactivate等多個
現有機器性能rebuild時間40+,考慮購置新機
20240820 新增 discourse-central-theme等幾個主題
新增學期版區,根據過評設置新建話題時必須按規定模板,為該版區啟用 “Grader”:a cold and unfeeling AI teacher, but with a playful twist。
嘗試解決作業提交問題,新增以模板reply功能
新增1-40週tags
20240818 加入高二課文全部注釋
20240815 增加他山版區作為其他學科場地,增加該區域AI同學Smarty,指令部分參考grok,實測比Roast還狠
增加搖人功能
啟用Chat完全體
20240814 * 代碼引入的課文衹是片段,手動補入全部課文正文
* 啟用Welcome Link Banner
* 更新各區域色塊,使暗模式不刺眼
* 增加一個AI_bot,@Roast ,顧名思義,該AI極其毒蛇
* 因光標帕金森,殺Discourse Tooltips
*為殺插件rebuild,順手添加:
* discourse-cakeday
* discourse-category-experts
* discourse-restricted-replies
* discourse-signatures
* Compact Nav
* Custom Profile Link
* Discourse OrgChart
* Discourse svgbob
* Share Link Shortener
20240813 使用Automation為所有主樓自動加入編輯時間
更新關鍵帖子排版,以便閱讀。
刪除文心區域,該區域帖子統一遷移至縱論,但貌似該動作導致每個帖子都顯示被Suen編輯了。
優化tags
20240812 重設幾個AI姓名,刪除_bot後綴,更人一些以便對話。
@Creative @Suen_AI @Teacher @PreQin_AIStu @Confucius @Caoxueqin
20240811 重新設計AI助學助教。除校內郵箱,僅保留proton和gmail。
20240809 1、開啟論壇教學勳章系統。解說:玩徽章
2、選必中對接完成。
3、Rebulid:
    • 加入 Yearly Review Plugin.
    • 再次啟用 IP Address Lookup
    • 增加 Discourse Tooltips光標指向後預覽帖子內容
20240808 藉助Azure接入gpt-4o-mini (version:2024-07-18)
You are a knowledgeable, sharp, profound, and interesting classmate. Your task is to chat with your peers, encouraging each other to think deeply and ask more questions. If the questions involve the textbook, refer to the course materials first. Each conversation should create some humorous anecdotes, like puns, and occasionally draw from classic works of literature from around the world. You frequently use knowledge points from various subjects to create jokes, making each day enjoyable and light-hearted for everyone. Keep the tone relaxed and fun.
測試中,暫未正式啟用。
20240807 啟用測試feature插件,暫時加入三個關鍵帖。
安裝Google font插件,暫不啟用。
20240801 開啟註冊,國內郵箱太多拒信,註冊郵箱限制為i.pkuschool.edu.cn ,或protonmail/gmail/hotmail/outlook/icloud
20240715 更新設置:等級三以上成員可看到在線成員:)


20240714
原服務器存儲空間不足,20240714完成服務器搬遷準備遷移服務器 - #7 by Creative_bot
新服務器:361.7 MB (134.2 GB free)
裸訪速度尚可,暫時不套CF。
順便加入幾個新插件:

cmd:
- git clone [GitHub - discourse/docker_manager: Plugin for use with discourse docker image](https://github.com/discourse/docker_manager.git)
- git clone [GitHub - discourse/discourse-solved: Allow accepted answers on topics](https://github.com/discourse/discourse-solved.git)
- git clone [GitHub - discourse/discourse-math: Official MathJax support for Discourse](https://github.com/discourse/discourse-math.git)
- git clone https://github.com/discourse/discourse-ai.git
- git clone [GitHub - discourse/discourse-whos-online: A plugin for Discourse which uses the messagebus to display a live list of active users](https://github.com/discourse/discourse-whos-online.git)
- git clone [GitHub - discourse/discourse-gamification](https://github.com/discourse/discourse-gamification.git)
- git clone [GitHub - discourse/discourse-topic-voting: Adds the ability for voting on a topic within a specified category in Discourse.](https://github.com/discourse/discourse-topic-voting.git)
- git clone [GitHub - discourse/discourse-reactions](https://github.com/discourse/discourse-reactions.git)
- git clone [GitHub - discourse/discourse-assign: Plugin for assigning users to a topic](https://github.com/discourse/discourse-assign.git)
- git clone [GitHub - discourse/discourse-docs](https://github.com/discourse/discourse-docs.git)
- git clone [GitHub - discourse/discourse-translator](https://github.com/discourse/discourse-translator.git)
- git clone [GitHub - scavin/discourse-bilibili-onebox](https://github.com/scavin/discourse-bilibili-onebox.git)
- git clone https://github.com/discourse/discourse-user-notes.git
- git clone [GitHub - discourse/discourse-follow: A Discourse plugin that lets you follow other users.](https://github.com/discourse/discourse-follow.git)

20240517
Screenshot 2024-05-17 at 17.51.01
加入閱讀模式

20240426
已加入翻譯功能。
實測顯示多語言發帖可能不出現翻譯球。

20240420
重啟tags,梳理其群組。
新增docs插件,設置中。
已部署日曆插件,暫不啟用。
左下角增加黑白模式切換
繼續整理tags

20240416
只給代碼,自己猜用法
Basic Usage
The theme component interprets rolls formatted as [wrap=dice].

[wrap=dice]d20[/wrap]
[wrap=dice]d100[/wrap]
[wrap=dice]2d6[/wrap]

You can roll multiple dice of the same type, apply additive modifiers, and automatically check the result against a success threshold:

20240415
因bug已關閉音樂列表插件,刷新後不可見了就。暫時不開了。
增加回覆語音插件,已測試可用这下我也成犬子了 - #8 by suen

增加top-contributors-sidebar
Screenshot 2024-04-15 at 21.44.27
更新表情:)

20240414
已加入音樂列表插件,下次重構後生效。

Dmit放出來幾款vps,Now let’s set our eyes on Los Angeles. - DMIT 實際體驗線路不錯,考慮之後購置為論壇主機。成本:PVM.LAX.EB.TINY (OpenBeta)+30g硬盤,折扣後每年約100刀;猶疑點:直連速度肯定比現有好,但不套CF也是個問題⋯⋯
這些事做起來不免煩悶,如果不是黨國胡管亂管,導致各種國內雲和域名完全不可用,精力要省70%⋯⋯

啟用所有主題左下角player

20240410
Gemini 1.5 Pro is now available in the API
With native audio (speech) and more

增加點贊多表情插件
增加 BBCode

[right]
Like this example
[/right]

* `[size=SIZE]` : set the size of text
* `[font=FACE]`: set the font face for text
* `[color=COLOR]`: set the [color=#381]color[/color] of text [/li]
* `[bgcolor=COLOR]`: set background color of text
* `[highlight]`: Highlight text
* `[small]`: Make text very small
* `[aname=NAME]`: create an anchor in your document with a name
* `[jumpto=NAME]`: jump to anchor created with `aname`

已更新Gemini key
啟用Microsoft Auth
By Discourse
Enable Login via Microsoft Identity Platform (Office 365 / Microsoft 365 Accounts)

20240409
開啟已部署插件 Topic Voting
寫入Giphy API Key,gif可用了。 設置為PG13
刪除排行榜內管理員

20240408
更新好玩的排名插件和voting
https://forum.bdfzer.com/leaderboard/1

20240406
暫停Claude助教,API門檻變高了 :thinking:

20240403
測試,已加入 Workers AI (Beta) API

20240402
調整助教:
@Creative_bot 繼續作為主助教,主要聊天答疑;來自Google的Gemini pro 1.5。Google即將收費,看後續質量如何。
@claude_3_sonnet_bot 來自Claude,聊天比Gemini更好,擅於長文本,每月5刀,此刻餘額$0.36,聊光後充值。從近日運行看,其質量高於Gemini pro。考慮作為主助教中。
暫刪除@gpt3.5_bot,後續如何,再看。3.5已無需註冊,不接入4意義不大了。當然,前提是,要有人教會更多人使用3.5。
暫停root_bot,@Artist_bot,其識別圖像功能由@claude_3_sonnet_bot 承擔。

20240327
升級API為gemini-1.5-pro-latest。

20240316
週末,完善教學論壇功能。
hooks:
after_code: - exec: cd: $home/plugins cmd: - sudo -E -u discourse git clone GitHub - discourse/docker_manager: Plugin for use with discourse docker image - sudo -E -u discourse git clone GitHub - discourse/discourse-solved: Allow accepted answers on topics - sudo -E -u discourse git clone GitHub - discourse/discourse-math: Official MathJax support for Discourse - sudo -E -u discourse git clone GitHub - discourse/discourse-ai - sudo -E -u discourse git clone GitHub - discourse/discourse-whos-online: A plugin for Discourse which uses the messagebus to display a live list of active users - sudo -E -u discourse git clone GitHub - paviliondev/discourse-locations: Tools for handling locations in Discourse

主要為了AI,7號已經收到了Gemini 1.5 Pro model,可惜Gemini 1.5 Pro is not yet available through API (as of 15 March 2024) and only accessible through AI studio. Only 1.0 is available through API. 那就先接入1.0了。
Claude前幾天更新後,不出意料的一片全面超越GPT,文心一言自己在國內說,我們中文處理超越GPT了,這些⋯⋯說說嗎,為流量為錢權,隨便。
作為多平台用戶之一,個人感覺,日常使用,迄今,只有GPT-4可以真的作為一個“人”一般的助手,每天每天,和我一起做很多事情。

重構後台,添加完KEY,對接很順利:https://forum.bdfzer.com/t/ai/78/2

找右上角機器人,愉快玩耍起來。

數學公式一併接入:
image
加入助教總結
image

避免不必要資料分享,已關閉遊客下載權限。
啟用問答分區,強化solution。

20240315
打開速度不佳。嘗試解決:

  • 套入CF
  • 啟用 Full (strict) Encrypts end-to-end, but requires a trusted CA or Cloudflare Origin CA certificate on the server

啟用一台新主機作為論壇備份,域名設置為 forum.bdfz.net ,該域名不作為正式環境,僅不定期備份,同時作為應急環境。
一旦正式主機故障,將遷移正式環境域名 forum.bdfzer.com 到應急主機內。

一個學期以來,靜態資料的網站資料,現有學生絕大多數只需要課堂一起讀閱,沒必要讓牆內可見。所以,關閉CF反代,使牆內不可見課程網站與博客。或者說,讓可以見者見。
https://blog.bdfzer.com/
https://chinese.bdfzer.com/

一週以來,論壇運行良好,無互動,不學習,正式作為教學主陣地運行。

:books: 教材網站 :eyes: 高考默寫 :bulb: 論壇維護 :writing_hand: 教材博文 :secret: GPTs :earth_asia: 國際視野

Last edited by @suen 2024-09-12T00:50:16Z

1 Like

1000个token四毛钱 :thinking:
真接过来感觉能把那三个都停了,毕竟gpt4无可指摘的优势

1 Like

反馈:player模块有bug,在学校平板上打开会无法关闭,只能刷新
Screenshot_20240415_191835

其他信息:
用户代理字符串:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
浏览器:安卓Chrome App
内核:Chromium 107(我更新过chrome,其他没更新过浏览器版本的内核应该更老)
这平板分辨率是2000*1200的:)

1 Like

反馈体验bug:在加入解决方案和复制链接分享的功能后,给帖子点赞越来越麻烦了,触摸屏总是会点错,不知道能不能针对触控进行专门的优化

1 Like

等我看看插件代碼

长摁即可。

2 Likes

@suen “疑似不是句子”的bug又在发威啦,打ai发不出来

左下角增加黑白模式切換
繼續整理tags

1 Like

伟大的模式

1 Like

論壇現接入AI是Gemini pro模型,從費用看使用率,顯然用得太少了:
image
叩首Google,以示尊重:)

Personal Memo: Automating Backups Locally with Discourse, Google Drive, and Telegram Notifications

Overview

Automate Discourse backups from a local machine, upload them to Google Drive, and receive status notifications via Telegram.

Key Tasks:

  1. Every 3 days: Download the latest Discourse backup from the remote server.
  2. Every 7 days: Upload the latest backup to Google Drive.
  3. Receive Telegram Bot notifications for success/failure alerts.
  4. Use rclone for cloud synchronization.
  5. Automate SSH transfers with sshpass.

Step 1: Install sshpass for Unattended SSH Transfers

Install via Homebrew:

brew install hudochenkov/sshpass/sshpass

Example to automate file transfers:

sshpass -p "$VPS_PASSWORD" scp -o StrictHostKeyChecking=no $VPS_USER@$VPS_HOST:$VPS_BACKUP_DIR/$LATEST_BACKUP $LOCAL_BACKUP_DIR

Step 2: Set Up Google Drive API Credentials

  1. Google Cloud Console: Create a project and enable the Google Drive API.
  2. Create OAuth 2.0 Credentials: Set application type to Desktop App.
  3. Download JSON file: This contains the client_id and client_secret.

Step 3: Write the Backup Script

#!/bin/bash

LOG_FILE="$HOME/discourse_backup.log"
BOT_TOKEN="YOUR_BOT_TOKEN"
CHAT_ID="YOUR_CHAT_ID"

send_telegram_message() {
  local message=$1
  curl -s -X POST "https://api.telegram.org/bot$BOT_TOKEN/sendMessage" -d chat_id="$CHAT_ID" -d text="$message"
}

log_and_notify() {
  local message=$1
  echo "$(date): $message" >> $LOG_FILE
  send_telegram_message "$message"
}

VPS_USER="your_vps_user"
VPS_HOST="your_vps_ip"
VPS_PASSWORD="your_vps_password"
VPS_BACKUP_DIR="/var/discourse/shared/standalone/backups/default"
LOCAL_BACKUP_DIR="$HOME/discourse_backups"
REMOTE_NAME="gdrive:DiscourseBackups"
MAX_RETRIES=3
mkdir -p $LOCAL_BACKUP_DIR

CURRENT_DAY=$(date +%s)
DOWNLOAD_INTERVAL=259200  # 3 days in seconds
UPLOAD_INTERVAL=604800    # 7 days in seconds
LAST_DOWNLOAD_FILE="$HOME/.last_download"
LAST_UPLOAD_FILE="$HOME/.last_upload"

if [ ! -f "$LAST_DOWNLOAD_FILE" ] || [ $((CURRENT_DAY - $(cat $LAST_DOWNLOAD_FILE))) -ge $DOWNLOAD_INTERVAL ]; then
    log_and_notify "Starting backup download..."
    for i in $(seq 1 $MAX_RETRIES); do
        LATEST_BACKUP=$(sshpass -p "$VPS_PASSWORD" ssh -o StrictHostKeyChecking=no $VPS_USER@$VPS_HOST "ls -t $VPS_BACKUP_DIR | head -n 1")
        sshpass -p "$VPS_PASSWORD" scp -o StrictHostKeyChecking=no $VPS_USER@$VPS_HOST:$VPS_BACKUP_DIR/$LATEST_BACKUP $LOCAL_BACKUP_DIR
        if [ $? -eq 0 ]; then
            log_and_notify "Downloaded $LATEST_BACKUP successfully."
            echo $CURRENT_DAY > $LAST_DOWNLOAD_FILE
            break
        fi
    done
fi

if [ ! -f "$LAST_UPLOAD_FILE" ] || [ $((CURRENT_DAY - $(cat $LAST_UPLOAD_FILE))) -ge $UPLOAD_INTERVAL ]; then
    log_and_notify "Uploading backup to Google Drive..."
    rclone copy $LOCAL_BACKUP_DIR/$LATEST_BACKUP $REMOTE_NAME
    if [ $? -eq 0 ]; then
        log_and_notify "Uploaded $LATEST_BACKUP successfully."
        echo $CURRENT_DAY > $LAST_UPLOAD_FILE
    fi
fi

cd $LOCAL_BACKUP_DIR
ls -t | tail -n +3 | xargs rm -f
log_and_notify "Cleanup completed. Two most recent backups retained."

Step 4: Automate with Cron

Run the script daily using cron:

crontab -e

Add the following line to run the script every day at noon:

0 12 * * * /usr/local/bin/discourse_backup.sh

Step 5: Configure Telegram Bot

  1. Create a Telegram bot using BotFather.
  2. Use the bot’s API token in the script for notifications.

为什么一只语文老师这么懂电脑 :thinking:

1 Like

這題我會。
乍看呢,語文的字詞句和計算機0101,骨子裡都是字符串,這一輪神經網絡LLms最終搞出GPT,就是把人類語言的字詞一頓暴力計算,串成了烤肉。
keanu reeves 90s GIF
深究呀,啥語文啥計算機,就是一不怎麼和人類打交道的人,為了做自己想做的,絮絮叨叨絮絮叨叨,時不時和計算機聊天。
自評滿分。

image
期待吧。

例行rebulid即將開始,大致40min後重新上線。

back online.
網絡問題被中斷兩次,所以⋯⋯拉伸了很長。

修復公式顯示。
刪除docs模塊等待官方新版本。
刪除bilibili嵌入。
刪除teambuild插件。

tags貌似依舊有顯示bug。
重啟選詞詢問AI。

rebuild耗時一小時,有點不能忍,考慮黑五進化服務器了。

有没有维护补偿🤔

作業珍寶來十個? :smirk:

1 Like