mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-04 21:06:03 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8164f4b506 | ||
|
|
9617be0ca4 | ||
|
|
f079d7b9fa | ||
|
|
00afda452f | ||
|
|
70386abadd | ||
|
|
aba9d945b5 | ||
|
|
ced38490e1 | ||
|
|
ad28b69198 |
@@ -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>
|
||||||
|
|
||||||
## 😘致谢
|
## 😘致谢
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
@@ -1 +1 @@
|
|||||||
|
2023/3/31 21:35 【插件兼容性问题】若您使用了revLibs插件,并将主程序升级到了v2.3.0,请立即使用管理员账号向机器人账号发送!plugin update命令更新逆向库插件,以解决由于情景预设重构引起的兼容性问题。
|
||||||
|
|||||||
Reference in New Issue
Block a user