chatGPT已经火挺久了,个人也是经常使用协助日常工作,或者去问答板块答点题。chatGPT出来的一开始,我就想到能不能利用chatGPT干些什么事,除了帮助我以外。这一问一答,就让我想起了csdn的问答板块。

其实我属于第一批使用chatGPT在问答板块进行回答的人,个人感觉chatGPT功能确实很强大。也能帮助不少人解决问题,但是chatGPT回答的答案除了有造假编造以外,个人感觉它的回答不够像个真人,如果是真人回答的话,那被采纳成功的概率会不会变大呢?正好我了解一些vbs脚本,便使用vbs编写了一个可以让回答拟人化点的脚本,里面的关键词也在不断更新。

我是感觉现在问答板块已经被chatGPT席卷了,希望问问题的人有更多辨别是非的能力,毕竟chatGPT的答案始终是仅供参考的,正如我使用chatGPT在回答的时候也会加上“仅供参考”。

下面我贴上我不断更新后的vbs脚本代码,希望能用在合适的地方,或者说是否能对抗chatGPT即将推出的【AI标识】。chatGPT更适合给自己使用,协助自己的工作,那还是勉强可以的。

Const ForReading = 1
Const ForWriting = 2

Set objFSO = CreateObject("Scripting.FileSystemObject")

' 读取文本文件
Set objFile = objFSO.OpenTextFile("F:\code\test.txt", ForReading)
strText = objFile.ReadAll
objFile.Close

' 拟人化智能字典库
' 关键词根:你
strText = Replace(strText, "首先,你可以尝试", "可以先试试")
strText = Replace(strText, "会对你有帮助", "会有帮助")
strText = Replace(strText, "首先,你需要", "需要先")
strText = Replace(strText, "对于你的问题", "对于这个问题")
strText = Replace(strText, "你在尝试", "在")
strText = Replace(strText, "你尝试", "")
strText = Replace(strText, "给你:", ":")
strText = Replace(strText, "你的", "")
strText = Replace(strText, "你", "")

' 关键词根:您
strText = Replace(strText, "会对您有帮助", "会有帮助")
strText = Replace(strText, "首先,您需要", "需要先")
strText = Replace(strText, "首先,您", "")
strText = Replace(strText, "您在尝试", "在")
strText = Replace(strText, "给您:", ":")
strText = Replace(strText, "您的", "")
strText = Replace(strText, "您", "")

' 关键词根:我
strText = Replace(strText, "我们知道,", "")
strText = Replace(strText, "我们", "")
strText = Replace(strText, "我猜测", "我觉得")
strText = Replace(strText, "首先,我", "可以")

' 关键词根:例如
strText = Replace(strText, "。例如:", ":")
strText = Replace(strText, ",例如:", ":")
strText = Replace(strText, "例如,如果", "假如")
strText = Replace(strText, "例如,", "例如")
strText = Replace(strText, "例如:", "")

' 关键词类:复杂类
strText = Replace(strText, "所以,", "所以")
strText = Replace(strText, "总之,", "总结就是")
strText = Replace(strText, "但是,", "但是")
strText = Replace(strText, "是的,", "是这样的,")
strText = Replace(strText, "请", "")
strText = Replace(strText, "则", "就")
strText = Replace(strText, "因此,", "因此")
strText = Replace(strText, "首先,需要", "需要先")
strText = Replace(strText, "首先,可以", "可以先")
strText = Replace(strText, "然后,", "然后")
strText = Replace(strText, "最后,", "")
strText = Replace(strText, "这样,", "这样")
strText = Replace(strText, "此外,可以", "还可以")
strText = Replace(strText, "此外,", "此外")
strText = Replace(strText, "另外,", "另外")
strText = Replace(strText, "其次,可以", "接着可以")
strText = Replace(strText, "其次,", "其次")

' 关键词根:注意
strText = Replace(strText, "注意:", "这里注意")
strText = Replace(strText, "注意,", "注意下")

' 关键词类:没归类
strText = Replace(strText, "Copy code", "```")
strText = Replace(strText, "中国", "我国")

' 关键词根:尝试
strText = Replace(strText, "如果尝试打开", "如果打开")
strText = Replace(strText, "已经尝试了", "已经试了")
strText = Replace(strText, "它会尝试", "它会")
strText = Replace(strText, "重新尝试", "试试")
strText = Replace(strText, "并尝试解决", "并试着进一步解决")
strText = Replace(strText, "再次尝试", "再试试")
strText = Replace(strText, "可以尝试", "可以试试")
strText = Replace(strText, "在尝试", "在")

' 定义替换列表
replaceList = Array("可以试试", "试试", "试一下", "试着", "试试看", "可以试一下", "可以试着", "可以试试看", "还可以试试")

' 随机数生成函数
Function getRandomWord()
  Randomize
  ' 随机选取一个替换词
  randomIndex = Int((UBound(replaceList) - LBound(replaceList) + 1) * Rnd + LBound(replaceList))
  getRandomWord = replaceList(randomIndex)
End Function

' 替换文本中的所有"尝试"
Do While InStr(strText, "尝试")
  replaceWord = getRandomWord()
  strText = Replace(strText, "尝试", replaceWord, 1, 1, vbTextCompare)
Loop

' 写入文本文件
Set objFile = objFSO.OpenTextFile("F:\code\test.txt", ForWriting, True)
objFile.Write strText & vbCrLf & "仅供参考,望采纳,谢谢。"

objFile.Close

'运行后打开文件
Set objShell = CreateObject("WScript.Shell")
objShell.Run "notepad.exe F:\code\test.txt"

至于如何使用vbs脚本,自己研究吧。

更多推荐

[chatGPT]回答拟人化脚本