mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
update setter of is_writable and is_readable
This commit is contained in:
parent
37c4b5c158
commit
dbf41120b0
1 changed files with 10 additions and 2 deletions
|
|
@ -49,7 +49,11 @@ class ExperienceManager(BaseModel):
|
|||
|
||||
@is_readable.setter
|
||||
def is_readable(self, value: bool):
|
||||
self.config.exp_pool.enabled = self.config.exp_pool.enable_read = value
|
||||
self.config.exp_pool.enable_read = value
|
||||
|
||||
# If set to True, ensure that enabled is also True.
|
||||
if value:
|
||||
self.config.exp_pool.enabled = True
|
||||
|
||||
@property
|
||||
def is_writable(self) -> bool:
|
||||
|
|
@ -57,7 +61,11 @@ class ExperienceManager(BaseModel):
|
|||
|
||||
@is_writable.setter
|
||||
def is_writable(self, value: bool):
|
||||
self.config.exp_pool.enabled = self.config.exp_pool.enable_write = value
|
||||
self.config.exp_pool.enable_write = value
|
||||
|
||||
# If set to True, ensure that enabled is also True.
|
||||
if value:
|
||||
self.config.exp_pool.enabled = True
|
||||
|
||||
@handle_exception
|
||||
def create_exp(self, exp: Experience):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue