mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-24 14:15:17 +02:00
experience pool
This commit is contained in:
parent
5c416a1f31
commit
15b86e8533
10 changed files with 106 additions and 0 deletions
21
examples/exp_pool/manager.py
Normal file
21
examples/exp_pool/manager.py
Normal 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())
|
||||
Loading…
Add table
Add a link
Reference in a new issue