From 48eeb3dcb89406dcc40bd547968c3e306cf0c3b3 Mon Sep 17 00:00:00 2001 From: yhjun1026 <460342015@qq.com> Date: Wed, 14 Jun 2023 21:54:43 +0800 Subject: [PATCH] async auto load plugin --- pilot/common/plugins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pilot/common/plugins.py b/pilot/common/plugins.py index d8b5c7a07..501153bb4 100644 --- a/pilot/common/plugins.py +++ b/pilot/common/plugins.py @@ -84,7 +84,8 @@ def load_native_plugins(cfg: Config): native_plugin_repo = "DB-GPT-Plugins" url = "https://github.com/csunny/{repo}/archive/{branch}.zip" try: - response = requests.get(url.format(repo=native_plugin_repo, branch=branch_name), + session = requests.Session() + response = session.get(url.format(repo=native_plugin_repo, branch=branch_name), headers={'Authorization': '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'}) if response.status_code == 200: