Skip to content

Commit

Permalink
fix bug in service_factory (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavdGao authored Mar 10, 2024
1 parent 3ea680b commit 6491eea
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/agentscope/service/service_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,15 @@ def get(
}

# Prepare default values
args_defaults = dict(
zip(
reversed(argsspec.args),
reversed(argsspec.defaults), # type: ignore
),
)
if argsspec.defaults is None:
args_defaults = {}
else:
args_defaults = dict(
zip(
reversed(argsspec.args),
reversed(argsspec.defaults), # type: ignore
),
)

args_required = sorted(
list(set(args_agent) - set(args_defaults.keys())),
Expand Down

0 comments on commit 6491eea

Please sign in to comment.