Browse Source

Merge branch 'update-hello' of git@github.com:6vision/chatgpt-on-wechat.git into feat_local

master
6vision 7 months ago
parent
commit
5798aeb3cd
5 changed files with 7 additions and 9 deletions
  1. +1
    -0
      channel/chat_channel.py
  2. +1
    -1
      channel/wechat/wechat_channel.py
  3. +3
    -4
      common/linkai_client.py
  4. +0
    -3
      requirements-optional.txt
  5. +2
    -1
      requirements.txt

+ 1
- 0
channel/chat_channel.py View File

@@ -75,6 +75,7 @@ class ChatChannel(Channel):
): ):
session_id = group_id session_id = group_id
else: else:
logger.debug(f"No need reply, groupName not in whitelist, group_name={group_name}")
return None return None
context["session_id"] = session_id context["session_id"] = session_id
context["receiver"] = group_id context["receiver"] = group_id


+ 1
- 1
channel/wechat/wechat_channel.py View File

@@ -96,7 +96,7 @@ def qrCallback(uuid, status, qrcode):
print(qr_api4) print(qr_api4)
print(qr_api2) print(qr_api2)
print(qr_api1) print(qr_api1)
_send_qr_code([qr_api1, qr_api2, qr_api3, qr_api4])
_send_qr_code([qr_api3, qr_api4, qr_api2, qr_api1])
qr = qrcode.QRCode(border=1) qr = qrcode.QRCode(border=1)
qr.add_data(url) qr.add_data(url)
qr.make(fit=True) qr.make(fit=True)


+ 3
- 4
common/linkai_client.py View File

@@ -2,7 +2,7 @@ from bridge.context import Context, ContextType
from bridge.reply import Reply, ReplyType from bridge.reply import Reply, ReplyType
from common.log import logger from common.log import logger
from linkai import LinkAIClient, PushMsg from linkai import LinkAIClient, PushMsg
from config import conf, pconf, plugin_config, load_config
from config import conf, pconf, plugin_config, available_setting
from plugins import PluginManager from plugins import PluginManager




@@ -33,10 +33,9 @@ class ChatClient(LinkAIClient):
return return


local_config = conf() local_config = conf()
for key in local_config.keys():
if config.get(key) is not None:
for key in config.keys():
if key in available_setting and config.get(key) is not None:
local_config[key] = config.get(key) local_config[key] = config.get(key)

# 语音配置 # 语音配置
reply_voice_mode = config.get("reply_voice_mode") reply_voice_mode = config.get("reply_voice_mode")
if reply_voice_mode: if reply_voice_mode:


+ 0
- 3
requirements-optional.txt View File

@@ -35,9 +35,6 @@ broadscope_bailian
# google # google
google-generativeai google-generativeai


# linkai
linkai>=0.0.3.5

# dingtalk # dingtalk
dingtalk_stream dingtalk_stream




+ 2
- 1
requirements.txt View File

@@ -6,4 +6,5 @@ requests>=2.28.2
chardet>=5.1.0 chardet>=5.1.0
Pillow Pillow
pre-commit pre-commit
web.py
web.py
linkai>=0.0.3.7

Loading…
Cancel
Save