瀏覽代碼

chore: update requirements and config-template

lanvent 3 年之前
父節點
當前提交
6bd1242d43
共有 5 個文件被更改,包括 5 次插入4 次删除
  1. 1 1
      bridge/bridge.py
  2. 2 0
      channel/wechat/wechat_channel.py
  3. 0 1
      config-template.json
  4. 1 1
      requirements-optional.txt
  5. 1 1
      requirements.txt

+ 1 - 1
bridge/bridge.py

@@ -19,7 +19,7 @@ class Bridge(object):
         model_type = conf().get("model")
         model_type = conf().get("model")
         if model_type in ["text-davinci-003"]:
         if model_type in ["text-davinci-003"]:
             self.btype['chat'] = const.OPEN_AI
             self.btype['chat'] = const.OPEN_AI
-        if conf().get("use_azure_chatgpt"):
+        if conf().get("use_azure_chatgpt", False):
             self.btype['chat'] = const.CHATGPTONAZURE
             self.btype['chat'] = const.CHATGPTONAZURE
         self.bots={}
         self.bots={}
 
 

+ 2 - 0
channel/wechat/wechat_channel.py

@@ -147,6 +147,8 @@ class WechatChannel(ChatChannel):
             if conf().get('speech_recognition') != True:
             if conf().get('speech_recognition') != True:
                 return
                 return
             logger.debug("[WX]receive voice for group msg: {}".format(cmsg.content))
             logger.debug("[WX]receive voice for group msg: {}".format(cmsg.content))
+        elif cmsg.ctype == ContextType.IMAGE:
+            logger.debug("[WX]receive image for group msg: {}".format(cmsg.content))
         else:
         else:
             # logger.debug("[WX]receive group msg: {}, cmsg={}".format(json.dumps(cmsg._rawmsg, ensure_ascii=False), cmsg))
             # logger.debug("[WX]receive group msg: {}, cmsg={}".format(json.dumps(cmsg._rawmsg, ensure_ascii=False), cmsg))
             pass
             pass

+ 0 - 1
config-template.json

@@ -2,7 +2,6 @@
   "open_ai_api_key": "YOUR API KEY",
   "open_ai_api_key": "YOUR API KEY",
   "model": "gpt-3.5-turbo",
   "model": "gpt-3.5-turbo",
   "proxy": "",
   "proxy": "",
-  "use_azure_chatgpt": false,
   "single_chat_prefix": ["bot", "@bot"],
   "single_chat_prefix": ["bot", "@bot"],
   "single_chat_reply_prefix": "[bot] ",
   "single_chat_reply_prefix": "[bot] ",
   "group_chat_prefix": ["@bot"],
   "group_chat_prefix": ["@bot"],

+ 1 - 1
requirements-optional.txt

@@ -21,4 +21,4 @@ web.py
 
 
 # chatgpt-tool-hub plugin
 # chatgpt-tool-hub plugin
 --extra-index-url https://pypi.python.org/simple
 --extra-index-url https://pypi.python.org/simple
-chatgpt_tool_hub>=0.3.5
+chatgpt_tool_hub>=0.3.7

+ 1 - 1
requirements.txt

@@ -1,4 +1,4 @@
-openai>=0.27.2
+openai==0.27.2
 HTMLParser>=0.0.2
 HTMLParser>=0.0.2
 PyQRCode>=1.2.1
 PyQRCode>=1.2.1
 qrcode>=7.4.2
 qrcode>=7.4.2