Compare commits

...

8 Commits

Author SHA1 Message Date
Rock Chin
8164f4b506 Release v2.3.1 2023-04-02 16:32:52 +08:00
Rock Chin
9617be0ca4 fix: 未指定utf-8保存已输出的公告 2023-04-02 16:30:42 +08:00
Rock Chin
f079d7b9fa fix: Windows上无法读取和应用命令权限配置的问题 2023-04-02 16:24:30 +08:00
Rock Chin
00afda452f Merge pull request #365 from zyckk4/style-improvements
去除行尾空格
2023-04-02 16:04:52 +08:00
zyckk4
70386abadd 去除行尾空格 2023-04-02 14:43:34 +08:00
Rock Chin
aba9d945b5 doc: 收起功能概述 2023-04-01 09:59:33 +08:00
Rock Chin
ced38490e1 chore: 兼容性问题公告 2023-03-31 21:37:35 +08:00
Rock Chin
ad28b69198 doc: 添加ChatPoeBot插件链接 (#352) 2023-03-31 21:31:40 +08:00
9 changed files with 34 additions and 25 deletions

View File

@@ -47,6 +47,9 @@
## ✅功能 ## ✅功能
<details>
<summary>点击此处展开概述</summary>
<details> <details>
<summary>✅支持敏感词过滤,避免账号风险</summary> <summary>✅支持敏感词过滤,避免账号风险</summary>
@@ -124,6 +127,7 @@
- 目前已支持正向代理访问接口 - 目前已支持正向代理访问接口
- 详细请查看config.py中的`openai_config`的说明 - 详细请查看config.py中的`openai_config`的说明
</details> </details>
</details>
详情请查看[Wiki功能使用页](https://github.com/RockChinQ/QChatGPT/wiki/%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8#%E5%8A%9F%E8%83%BD%E7%82%B9%E5%88%97%E4%B8%BE) 详情请查看[Wiki功能使用页](https://github.com/RockChinQ/QChatGPT/wiki/%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8#%E5%8A%9F%E8%83%BD%E7%82%B9%E5%88%97%E4%B8%BE)
@@ -245,7 +249,8 @@ python3 main.py
- [dominoar/QCP-NovelAi](https://github.com/dominoar/QCP-NovelAi) - NovelAI 故事叙述与绘画 - [dominoar/QCP-NovelAi](https://github.com/dominoar/QCP-NovelAi) - NovelAI 故事叙述与绘画
- [oliverkirk-sudo/chat_voice](https://github.com/oliverkirk-sudo/chat_voice) - 文字转语音输出使用HuggingFace上的[VITS-Umamusume-voice-synthesizer模型](https://huggingface.co/spaces/Plachta/VITS-Umamusume-voice-synthesizer) - [oliverkirk-sudo/chat_voice](https://github.com/oliverkirk-sudo/chat_voice) - 文字转语音输出使用HuggingFace上的[VITS-Umamusume-voice-synthesizer模型](https://huggingface.co/spaces/Plachta/VITS-Umamusume-voice-synthesizer)
- [RockChinQ/WaitYiYan](https://github.com/RockChinQ/WaitYiYan) - 实时获取百度`文心一言`等待列表人数 - [RockChinQ/WaitYiYan](https://github.com/RockChinQ/WaitYiYan) - 实时获取百度`文心一言`等待列表人数
- [QChartGPT_Emoticon_Plugin](https://github.com/chordfish-k/QChartGPT_Emoticon_Plugin) - 使机器人根据回复内容发送表情包 - [chordfish-k/QChartGPT_Emoticon_Plugin](https://github.com/chordfish-k/QChartGPT_Emoticon_Plugin) - 使机器人根据回复内容发送表情包
- [oliverkirk-sudo/ChatPoeBot](https://github.com/oliverkirk-sudo/ChatPoeBot) - 接入[Poe](https://poe.com/)上的机器人
</details> </details>
## 😘致谢 ## 😘致谢

View File

@@ -315,12 +315,16 @@ def register_all():
def apply_privileges(): def apply_privileges():
"""读取cmdpriv.json并应用指令权限""" """读取cmdpriv.json并应用指令权限"""
with open('cmdpriv.json', 'r') as f: # 读取内容
data = json.load(f) json_str = ""
for path, priv in data.items(): with open('cmdpriv.json', 'r', encoding="utf-8") as f:
if path == 'comment': json_str = f.read()
continue
if __command_list__[path]['privilege'] != priv:
logging.debug('应用权限: {} -> {}(default: {})'.format(path, priv, __command_list__[path]['privilege']))
__command_list__[path]['privilege'] = priv data = json.loads(json_str)
for path, priv in data.items():
if path == 'comment':
continue
if __command_list__[path]['privilege'] != priv:
logging.debug('应用权限: {} -> {}(default: {})'.format(path, priv, __command_list__[path]['privilege']))
__command_list__[path]['privilege'] = priv

View File

@@ -22,10 +22,10 @@ def read_saved() -> str:
# 已保存的在res/announcement_saved # 已保存的在res/announcement_saved
# 检查是否存在 # 检查是否存在
if not os.path.exists("res/announcement_saved"): if not os.path.exists("res/announcement_saved"):
with open("res/announcement_saved", "w") as f: with open("res/announcement_saved", "w", encoding="utf-8") as f:
f.write("") f.write("")
with open("res/announcement_saved", "r") as f: with open("res/announcement_saved", "r", encoding="utf-8") as f:
content = f.read() content = f.read()
return content return content
@@ -33,7 +33,7 @@ def read_saved() -> str:
def write_saved(content: str): def write_saved(content: str):
# 已保存的在res/announcement_saved # 已保存的在res/announcement_saved
with open("res/announcement_saved", "w") as f: with open("res/announcement_saved", "w", encoding="utf-8") as f:
f.write(content) f.write(content)

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
2023/3/31 21:35 【插件兼容性问题】若您使用了revLibs插件并将主程序升级到了v2.3.0,请立即使用管理员账号向机器人账号发送!plugin update命令更新逆向库插件以解决由于情景预设重构引起的兼容性问题。