mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-18 02:16:07 +00:00
删除一部分注释和调试信息
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@ preset_mode = "default"
|
|||||||
|
|
||||||
# 过滤AI脱离人设的消息
|
# 过滤AI脱离人设的消息
|
||||||
# 这类消息在对应情景json中设置,将其替换为自定义消息,以保持人格
|
# 这类消息在对应情景json中设置,将其替换为自定义消息,以保持人格
|
||||||
# filter_ai_warning = False
|
filter_ai_warning = False
|
||||||
|
|
||||||
# 群内响应规则
|
# 群内响应规则
|
||||||
# 符合此消息的群内消息即使不包含at机器人也会响应
|
# 符合此消息的群内消息即使不包含at机器人也会响应
|
||||||
|
|||||||
+12
-10
@@ -256,17 +256,19 @@ class Session:
|
|||||||
del (res_ans_spt[0])
|
del (res_ans_spt[0])
|
||||||
res_ans = '\n\n'.join(res_ans_spt)
|
res_ans = '\n\n'.join(res_ans_spt)
|
||||||
|
|
||||||
|
|
||||||
# 检测是否包含ai人格否定
|
# 检测是否包含ai人格否定
|
||||||
# logging.debug('bot_filter: {}'.format(self.bot_filter))
|
logging.debug('bot_filter: {}'.format(self.bot_filter))
|
||||||
# if config.filter_ai_warning and self.bot_filter:
|
if config.filter_ai_warning and self.bot_filter:
|
||||||
# import re
|
import re
|
||||||
# match = re.search(self.bot_filter['reg'], res_ans)
|
match = re.search(self.bot_filter['reg'], res_ans)
|
||||||
# logging.debug(self.bot_filter)
|
logging.debug(self.bot_filter)
|
||||||
# logging.debug(res_ans)
|
logging.debug(res_ans)
|
||||||
# if match:
|
if match:
|
||||||
# logging.debug('回复:{}, 检测到人格否定,替换中。。'.format(res_ans))
|
logging.debug('回复:{}, 检测到人格否定,替换中。。'.format(res_ans))
|
||||||
# res_ans = self.bot_filter['replace']
|
res_ans = self.bot_filter['replace']
|
||||||
# logging.debug('替换为: {}'.format(res_ans))
|
logging.debug('替换为: {}'.format(res_ans))
|
||||||
|
|
||||||
|
|
||||||
# 将此次对话的双方内容加入到prompt中
|
# 将此次对话的双方内容加入到prompt中
|
||||||
self.prompt.append({'role': 'user', 'content': text})
|
self.prompt.append({'role': 'user', 'content': text})
|
||||||
|
|||||||
Reference in New Issue
Block a user