Merge branch 'feat-exp-pool' into 'mgx_ops'

exp_pool add `enabled`

See merge request pub/MetaGPT!291
This commit is contained in:
张雷 2024-08-12 03:11:59 +00:00
commit a9ac0b128e
7 changed files with 12 additions and 6 deletions

View file

@ -159,7 +159,7 @@ class TestExpCache:
@pytest.mark.asyncio
async def test_exp_cache_disabled(self, mock_config, mock_exp_manager):
mock_config.exp_pool.enable_read = False
mock_config.exp_pool.enabled = False
@exp_cache(manager=mock_exp_manager)
async def test_func(req):

View file

@ -10,7 +10,7 @@ from metagpt.exp_pool.schema import QueryType
class TestExperienceManager:
@pytest.fixture
def mock_config(self):
return Config(llm=LLMConfig(), exp_pool=ExperiencePoolConfig(enable_write=True, enable_read=True))
return Config(llm=LLMConfig(), exp_pool=ExperiencePoolConfig(enable_write=True, enable_read=True, enabled=True))
@pytest.fixture
def mock_storage(self, mocker):