Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOTFIX] Fix bug in DictDialogAgent #342

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/agentscope/agents/dict_dialog_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ def reply(self, x: Optional[Union[Msg, Sequence[Msg]]] = None) -> Msg:
# Filter the parsed response by keys for storing in memory, returning
# in the reply function, and feeding into the metadata field in the
# returned message object.
self.memory.add(
Msg(self.name, self.parser.to_memory(res.parsed), "assistant"),
)
if self.memory:
self.memory.add(
Msg(self.name, self.parser.to_memory(res.parsed), "assistant"),
)

msg = Msg(
self.name,
Expand Down