Skip to content

Commit

Permalink
Fix bug in requiring necessary packages (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavdGao authored Mar 29, 2024
1 parent b702de1 commit 72e179b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
]

service_requires = [
"docstring_parser",
"docker",
"pymongo",
"pymysql",
Expand All @@ -46,6 +45,7 @@

# released requires
minimal_requires = [
"docstring_parser",
"loguru",
"tiktoken",
"Pillow",
Expand Down
7 changes: 7 additions & 0 deletions src/agentscope/service/service_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,13 @@ def get(
argsspec = inspect.getfullargspec(service_func)

# Construct the mapping from arguments to their typings
if parse is None:
raise ImportError(
"Missing required package `docstring_parser`"
"Please install it by "
"`pip install docstring_parser`.",
)

docstring = parse(service_func.__doc__)

# Function description
Expand Down

0 comments on commit 72e179b

Please sign in to comment.