experience pool

This commit is contained in:
seehi 2024-06-03 10:14:57 +08:00
parent 5c416a1f31
commit 15b86e8533
10 changed files with 106 additions and 0 deletions

View file

@ -0,0 +1,21 @@
from metagpt.exp_pool.manager import ExperiencePoolManager
from metagpt.exp_pool.schema import Experience
from pprint import pprint
import asyncio
# import logging
# logging.basicConfig(level=logging.DEBUG)
async def main():
req = "2048 game"
exp = Experience(req=req, resp="python code")
manager = ExperiencePoolManager()
# pprint(manager.storage.get())
# manager.create_exp(exp)
result = await manager.query_exp(req)
print(result)
if __name__ == "__main__":
asyncio.run(main())