From b2bb560007c166f96dd3fb795cd70efac21c5b25 Mon Sep 17 00:00:00 2001 From: Kevin Hu Date: Wed, 5 Feb 2025 12:04:11 +0800 Subject: [PATCH] Import akshare lazzily. (#4708) ### What problem does this PR solve? #4696 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- agent/component/akshare.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/component/akshare.py b/agent/component/akshare.py index 36b3131b3..a3ce3eb13 100644 --- a/agent/component/akshare.py +++ b/agent/component/akshare.py @@ -15,7 +15,6 @@ # from abc import ABC import pandas as pd -import akshare as ak from agent.component.base import ComponentBase, ComponentParamBase @@ -36,6 +35,7 @@ class AkShare(ComponentBase, ABC): component_name = "AkShare" def _run(self, history, **kwargs): + import akshare as ak ans = self.get_input() ans = ",".join(ans["content"]) if "content" in ans else "" if not ans: