revert to watch user requirement by default

This commit is contained in:
garylin2099 2024-10-14 17:07:55 +08:00
parent d97955643c
commit 2b2e4abf92

View file

@ -172,7 +172,9 @@ class Role(BaseRole, SerializationMixin, ContextMixin, BaseModel):
self._check_actions()
self.llm.system_prompt = self._get_prefix()
self.llm.cost_manager = self.context.cost_manager
self._watch(kwargs.pop("watch", []))
# if observe_all_msg_from_buffer, we should not use cause_by to select messages but observe all
if not self.observe_all_msg_from_buffer:
self._watch(kwargs.pop("watch", [UserRequirement]))
if self.latest_observed_msg:
self.recovered = True