mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
feat: 不再向openai completion api提供timeout参数
This commit is contained in:
2
main.py
2
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:
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -35,7 +35,6 @@ class OpenAIInteract:
|
||||
response = openai.Completion.create(
|
||||
prompt=prompt,
|
||||
stop=stop,
|
||||
timeout=config.process_message_timeout,
|
||||
**config.completion_api_params
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user