-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: Add 3 new features to Moderator #266
feat: Add 3 new features to Moderator #266
Conversation
…'t have to include all channels in the mapping
Also, for quick testing. I have added a DummyAgent in the demo file, so that the moderator can be tested without actually calling any LLM APIs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the effort! left some comments. One structural thing to note is that let's not use moderator inherit from the baseAgent.
Since the interface of baseAgent should be different. And we would want moderator have different event loop than the agent in the future.
This could be easy to do for now, just copy the baseagent code but make sure the send does not imply the action has to be the same
examples/experimental/sotopia_original_replica/llm_agent_sotopia.py
Outdated
Show resolved
Hide resolved
observations_map={ | ||
output_channel: Observation( | ||
agent_name="moderator", | ||
last_turn=self.scenario, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please double check the sotopia implementation of the last turn msg here:
sotopia/sotopia/envs/parallel.py
Line 300 in 61f190e
return { |
The initial/boosting msg for every character should be different. This is a very important feature in Sotopia about info asymmetry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made a temprary fix for this. I also notice that the current ScriptBackGround dataType only supports 2 agents in chat. I think I will create a new background dataType for moderator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
For testing purpose, can we route to the pytest files? |
…iting time is changed to 0.1 sec
… background information
Thanks for the review! I have made a few changes:
I have merged changes into the example directly, I will route future tests to pytest files if needed |
observations_map={ | ||
output_channel: Observation( | ||
agent_name="moderator", | ||
last_turn=self.scenario, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
81fd841
into
sotopia-lab:feature/sotopia-aact-env
* initial framework * initial conv * fix module error * feat: Add 3 new features to Moderator (#266) * feat:introduce booting procedure, saving, and ending chat to moderator * fix: moderator will now ignore none AgentAction, Observations now don't have to include all channels in the mapping * merge changes of example into the original one * fix: 1. save() method now accepts push_to_db config 2. booting()'s waiting time is changed to 0.1 sec * fix: rewrite booting() so that different agent will receive different background information * fix: moderator now inherits from Node directly, instead of from BaseAgent --------- Co-authored-by: JXZhou <JXZhou> * add save condition for moderator * push to db false * to fully stop * stopping all agents * fix mypy * fix mypy error --------- Co-authored-by: JXZhou <156194797+JXZhou0224@users.noreply.github.com>
Closes #
📑 Description
Three new features are add to Moderator
✅ Checks
type/descript
(e.g.feature/add-llm-agents
)ℹ Additional Information