Skip to content

Commit

Permalink
改进输入流机制
Browse files Browse the repository at this point in the history
  • Loading branch information
lunzhiPenxil committed Apr 11, 2023
1 parent 7d82f3b commit 94eacf8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions newbingAIOlivOSPlugin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,6 @@ def get_system_proxy():
dictReplyContextReg = {}

def replyCONTEXT_regGet(plugin_event:OlivOS.API.Event, tmp_reast_str:str):
res = False
flagResult = False
tmp_hagID = None
try:
tmp_hagID = plugin_event.data.group_id
Expand All @@ -213,7 +211,10 @@ def replyCONTEXT_regGet(plugin_event:OlivOS.API.Event, tmp_reast_str:str):
tmp_hash_list.append(contextRegHash([tmp_hagID, tmp_userID]))
if tmp_hagID is not None:
tmp_hash_list.append(contextRegHash([tmp_hagID, None]))
res_list = []
for tmp_hash in tmp_hash_list:
res = False
flagResult = False
if (
tmp_bothash in dictReplyContextReg
) and (
Expand Down Expand Up @@ -257,6 +258,9 @@ def replyCONTEXT_regGet(plugin_event:OlivOS.API.Event, tmp_reast_str:str):
dictReplyContextReg[tmp_bothash][tmp_hash]['msgid'] = tmp_msgid
else:
res = False
res_list = []
if True in res_list:
res = True
return res

def contextRegHash(data:list):
Expand Down

0 comments on commit 94eacf8

Please sign in to comment.