人工智能和自动化的组合拳能多大程度上解放劳动力?

你知道为什么我现在不怎么说话了吗,我现在正在和AI私聊

// ==UserScript==
// @name Toggleable Auto Hide Bot Thinking - BDFZ Forum
// @namespace your_namespace
// @match https://forum.rdfzer.com/t/*
// @grant GM_setValue
// @grant GM_getValue
// ==/UserScript==

(function() {
‘use strict’;

let isPluginEnabled = GM_getValue('isPluginEnabled', true);
const originalContentMap = new Map();
let toggleButton;

function isProbablyEnglish(text) {
    const englishCharRegex = /[a-zA-Z0-9\s.,!?;:'"(){}\[\]#%^&*+\-=_|<>`~]+/g;
    const matches = text.match(englishCharRegex);
    if (!matches) return false;
    const englishCharLength = matches.join('').length;
    return englishCharLength / text.length > 0.5;
}

function hideThinkingProcess() {
    if (!isPluginEnabled) return;

    const responseElements = document.querySelectorAll('.topic-post .cooked');

    responseElements.forEach(element => {
        if (originalContentMap.has(element)) return;

        originalContentMap.set(element, element.innerHTML);

        const textContent = element.textContent;
        if (!textContent) return;

        const blocks = textContent.split('\n');

        let actualResponseContent = "";
        let inThinkingProcess = true;

        for (const block of blocks) {
            const trimmedBlock = block.trim();
            if (inThinkingProcess && trimmedBlock && isProbablyEnglish(trimmedBlock)) {
                continue;
            } else {
                inThinkingProcess = false;
                actualResponseContent += block + "\n";
            }
        }

        actualResponseContent = actualResponseContent.trim();

        if (actualResponseContent) {
            element.innerHTML = '';
            const responseDiv = document.createElement('div');
            responseDiv.textContent = actualResponseContent;
            element.appendChild(responseDiv);
        }
    });
}

function restoreOriginalState() {
    originalContentMap.forEach((originalHTML, element) => {
        element.innerHTML = originalHTML;
    });
}

function createToggleButton() {
    toggleButton = document.createElement('button');
    updateButtonText();
    toggleButton.style.position = 'fixed';
    toggleButton.style.top = '10px';
    toggleButton.style.right = '10px';
    toggleButton.style.zIndex = '9999';
    toggleButton.style.padding = '5px 10px';
    toggleButton.style.backgroundColor = '#4CAF50';
    toggleButton.style.color = 'white';
    toggleButton.style.border = 'none';
    toggleButton.style.cursor = 'pointer';

    toggleButton.onclick = () => {
        isPluginEnabled = !isPluginEnabled;
        GM_setValue('isPluginEnabled', isPluginEnabled);
        updateButtonText();

        if (isPluginEnabled) {
            hideThinkingProcess();
        } else {
            restoreOriginalState();
            originalContentMap.clear(); // 在禁用时清空 originalContentMap
        }
    };
}

function updateButtonText() {
    if (toggleButton) {
        toggleButton.textContent = isPluginEnabled ? '禁用自动隐藏思考' : '启用自动隐藏思考';
    }
}

// 确保按钮在 DOM 加载完成后添加,并且添加到 body 的末尾
window.addEventListener('load', () => {
    createToggleButton();
    document.body.appendChild(toggleButton); // 添加到 body 末尾

    if (isPluginEnabled) {
        hideThinkingProcess();
    }
});

const intervalId = setInterval(() => {
    if (isPluginEnabled) {
        hideThinkingProcess();
    }
}, 1000);

})();

找AI写了一个插件,用于去除英文思考过程,放在篡改猴里就可以使用。
目前这个插件存在的问题有:
检测不准确,isProbablyEnglish()函数是一个非常粗糙的方法,有待改进
会破坏文字特效的结构,比如加粗,斜体等,另外投票和折叠功能等依赖英文代码的内容会被误删。
按钮只能生效一次,之后程序不会再运行
会把报错信息加入页面,无效信息更多了……

1 Like

挖个坟 我有一计:nerd_face::index_pointing_up:
不如先让高性能AI输出,再转接到V3这种non-reasoning的AI截取所谓“后半段中文部分”,即排除掉英文的思考部分

2 Likes

单纯脚本智商大概不高 还是让非思考AI来截取)

1 Like

有道理,但这样相当于调用两份API,完成一份工作,还是这样没水平的工作……

1 Like

相当于让土木博导带着博士生,去工地接力搬砖(

2 Likes

能否@suen看看可不可以在creative的输出逻辑里加上类似的内容,源头上折叠思考过程

2 Likes

之前的模型似乎是写死了,没法调整。
但现在creative似乎仍然是reasoning模型,却不再输出英文思维链了,问题已经解决。
我不清楚具体是如何实现的?有可能是用正则,也有可能是Google直接给的设置选项……
但总之都是技术性的细节,既然技术问题已经解决,如今也无关紧要了

1 Like

那没事了
我纯纯火星)

2 Likes