From 9e67883fbd0f02024ad4554d0cadd2beda22e2a4 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Fri, 14 Feb 2025 16:51:02 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20add=20no=5Fproxy=20env=20?= =?UTF-8?q?vars=20to=20support=20localhost=20requests,=20fix=20502=20error?= =?UTF-8?q?=20when=20use=20ollama=20#504?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/core_lifecycle.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/astrbot/core/core_lifecycle.py b/astrbot/core/core_lifecycle.py index e5630d017..0289c4d1a 100644 --- a/astrbot/core/core_lifecycle.py +++ b/astrbot/core/core_lifecycle.py @@ -27,7 +27,8 @@ class AstrBotCoreLifecycle: os.environ['https_proxy'] = self.astrbot_config['http_proxy'] os.environ['http_proxy'] = self.astrbot_config['http_proxy'] - + os.environ['no_proxy'] = 'localhost,127.0.0.1' + async def initialize(self): logger.info("AstrBot v"+ VERSION) if os.environ.get("TESTING", ""):