Skip to content

Commit

Permalink
change name of decorator, change type of glb_doing_signal_dict
Browse files Browse the repository at this point in the history
  • Loading branch information
qbc2016 committed Apr 25, 2024
1 parent 85f071a commit 5b036b3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/agentscope/agents/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __call__(cls, *args: tuple, **kwargs: dict) -> Any:
return instance

def __new__(mcs, name: Any, bases: Any, attrs: Any) -> Any:
if "reply" in attrs and not attrs.get("_skip_decorator", False):
if "reply" in attrs and not attrs.get("_skip_reply_decorator", False):
original_reply = attrs["reply"]
attrs["reply"] = pre_reply_decorator(original_reply)
return super().__new__(mcs, name, bases, attrs)
Expand Down
2 changes: 1 addition & 1 deletion src/agentscope/agents/user_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, name: str = "User", require_url: bool = False) -> None:
self.name = name
self.require_url = require_url

_skip_decorator = True
_skip_reply_decorator = True

def reply(
self,
Expand Down
7 changes: 1 addition & 6 deletions src/agentscope/web/studio/studio.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,8 @@ def init_uid_list() -> list:
return []


def init_uid_dict() -> dict:
"""Initialize an empty dict for storing user IDs."""
return {}


glb_history_dict = defaultdict(init_uid_list)
glb_doing_signal_dict = defaultdict(init_uid_dict)
glb_doing_signal_dict = defaultdict(init_uid_list)
glb_signed_user = []


Expand Down

0 comments on commit 5b036b3

Please sign in to comment.