Преглед изворни кода

request_timeout 没有这个参数了。

tanlie пре 1 година
родитељ
комит
d80c12a792
2 измењених фајлова са 5 додато и 4 уклоњено
  1. 2 1
      bot/chatgpt/chat_gpt_bot.py
  2. 3 3
      channel/wechatcom/README.md

+ 2 - 1
bot/chatgpt/chat_gpt_bot.py

@@ -19,6 +19,7 @@ from config import conf, load_config
 client = OpenAI(api_key=conf().get("open_ai_api_key"),
                 base_url=conf().get("open_ai_api_base", "https://api.openai.com/v1"))
 
+
 # OpenAI对话模型API (可用)
 class ChatGPTBot(Bot, OpenAIImage):
     def __init__(self):
@@ -42,7 +43,7 @@ class ChatGPTBot(Bot, OpenAIImage):
             "top_p": conf().get("top_p", 1),
             "frequency_penalty": conf().get("frequency_penalty", 0.0),  # [-2,2]之间,该值越大则更倾向于产生不同的内容
             "presence_penalty": conf().get("presence_penalty", 0.0),  # [-2,2]之间,该值越大则更倾向于产生不同的内容
-            "request_timeout": conf().get("request_timeout", None),  # 请求超时时间,openai接口默认设置为600,对于难问题一般需要较长时间
+            # "request_timeout": conf().get("request_timeout", None),  # 请求超时时间,openai接口默认设置为600,对于难问题一般需要较长时间, 升级后没有这个参数了
             "timeout": conf().get("request_timeout", None),  # 重试超时时间,在这个时间内,将会自动重试
         }
 

+ 3 - 3
channel/wechatcom/README.md

@@ -49,9 +49,9 @@ apt-get install libavcodec-extra
 - 在程序根目录`config.json`中增加配置(**去掉注释**),`wechatcomapp_aes_key`是当前页面的`wechatcomapp_aes_key`
 
 ```python
-    "channel_type": "wechatcom_app",
-    "wechatcom_corp_id": "ww360c91f6a29cf1a8",  # 企业微信公司的corpID
-    "wechatcomapp_token": "SpUxbPHmmb3knNUgbVQRJqANlfTVlY",  # 企业微信app的token
+    "channel_type": "",
+    "wechatcom_corp_id": "",  # 企业微信公司的corpID
+    "wechatcomapp_token": "",  # 企业微信app的token
     "wechatcomapp_port": 9898,  # 企业微信app的服务端口, 不需要端口转发
     "wechatcomapp_secret": "",  # 企业微信app的secret
     "wechatcomapp_agent_id": "",  # 企业微信app的agent_id