From 8eb12fe820b4ac7e22e20a747e61ba67ebcf5702 Mon Sep 17 00:00:00 2001 From: XuChenXu <91937041+ChenXu233@users.noreply.github.com> Date: Fri, 8 Nov 2024 22:39:13 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E5=BB=B6=E9=95=BFtimeout=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nonebot_plugin_summary/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nonebot_plugin_summary/utils.py b/nonebot_plugin_summary/utils.py index 24d653e..439886f 100644 --- a/nonebot_plugin_summary/utils.py +++ b/nonebot_plugin_summary/utils.py @@ -56,7 +56,7 @@ def __init__(self, prompt: str, api_key: str, model_name: str, endpoint: str): self.model_name = model_name self.api_key = api_key self.endpoint = endpoint - self.client = AsyncOpenAI(api_key=api_key, base_url=endpoint) + self.client = AsyncOpenAI(api_key=api_key, base_url=endpoint,timeout=60) async def post_content(self, string: str) -> str: completion = await self.client.beta.chat.completions.parse(