diff --git a/setup.py b/setup.py index ae2189fa1..1cbc55a3a 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ "expiringdict", ] -service_requires = ["docker", "pymongo", "pymysql"] +service_requires = ["docstring_parser", "docker", "pymongo", "pymysql"] doc_requires = [ "sphinx", diff --git a/src/agentscope/service/service_factory.py b/src/agentscope/service/service_factory.py index b1b9e9d03..d717c6960 100644 --- a/src/agentscope/service/service_factory.py +++ b/src/agentscope/service/service_factory.py @@ -14,7 +14,10 @@ get_origin, ) -from docstring_parser import parse +try: + from docstring_parser import parse +except ImportError: + parse = None from loguru import logger