feat: 不再向openai completion api提供timeout参数

This commit is contained in:
Rock Chin
2023-01-11 12:22:04 +08:00
parent dfa8621a1a
commit c7689d3c89
3 changed files with 1 additions and 3 deletions

View File

@@ -181,7 +181,7 @@ def main(first_time_init=False):
logging.info("当前已是最新版本")
except Exception as e:
logging.error("检查更新失败:{}".format(e))
logging.warning("检查更新失败:{}".format(e))
while True:
try:

View File

@@ -34,7 +34,6 @@ class DataGatherer:
config = pkg.utils.context.get_config()
if hasattr(config, "report_usage") and not config.report_usage:
return
# print("http://rockchin.top:18989/usage?service_name=qchatgpt.{}&version={}&count={}".format(subservice_name, self.version_str, count))
res = requests.get("http://rockchin.top:18989/usage?service_name=qchatgpt.{}&version={}&count={}".format(subservice_name, self.version_str, count))
if res.status_code != 200 or res.text != "ok":
logging.warning("report to server failed, status_code: {}, text: {}".format(res.status_code, res.text))

View File

@@ -35,7 +35,6 @@ class OpenAIInteract:
response = openai.Completion.create(
prompt=prompt,
stop=stop,
timeout=config.process_message_timeout,
**config.completion_api_params
)