From c7689d3c8956bf51dae2d8e8c28d4d30d5846669 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Wed, 11 Jan 2023 12:22:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=8D=E5=86=8D=E5=90=91openai=20com?= =?UTF-8?q?pletion=20api=E6=8F=90=E4=BE=9Btimeout=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 +- pkg/audit/gatherer.py | 1 - pkg/openai/manager.py | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index 2954e28f..a1d99bf4 100644 --- a/main.py +++ b/main.py @@ -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: diff --git a/pkg/audit/gatherer.py b/pkg/audit/gatherer.py index 4d9738d1..56093844 100644 --- a/pkg/audit/gatherer.py +++ b/pkg/audit/gatherer.py @@ -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)) diff --git a/pkg/openai/manager.py b/pkg/openai/manager.py index 0f48ed54..105b454b 100644 --- a/pkg/openai/manager.py +++ b/pkg/openai/manager.py @@ -35,7 +35,6 @@ class OpenAIInteract: response = openai.Completion.create( prompt=prompt, stop=stop, - timeout=config.process_message_timeout, **config.completion_api_params )