Open yousia33 opened 3 weeks ago
and this is what happend when role is customer_service
(metagpt) PS F:\MetaGPT> python F:\MetaGPT\test.py
2024-06-06 15:48:34.480 | INFO | metagpt.const:get_metagpt_package_root:29 - Package root set to F:\MetaGPT
Traceback (most recent call last):
File "F:\MetaGPT\test.py", line 4, in
For assistant: If using python>=3.11 this would be the issue, https://github.com/aio-libs-abandoned/aioredis-py/issues/1409
@geekan can the package aioredis
be changed to redis
? using this: https://github.com/aio-libs-abandoned/aioredis-py/issues/1301
For customer_service: pip install "metagpt[rag]"
code
import asyncio
from metagpt.context import Context from metagpt.roles.assistant import Assistant from metagpt.logs import logger
async def main(): msg = "Explain to child how you work as a doctor with nurses and pharmacists" context = Context() role = Assistant(context=context) logger.info(msg) result = await role.run(msg) logger.info(result)
asyncio.run(main())
Traceback
(metagpt) PS F:\MetaGPT> python F:\MetaGPT\test.py 2024-06-06 15:33:35.456 | INFO | metagpt.const:get_metagpt_package_root:29 - Package root set to F:\MetaGPT Traceback (most recent call last): File "F:\MetaGPT\test.py", line 4, in
from metagpt.roles.assistant import Assistant
File "F:\MetaGPT\metagpt\roles\assistant.py", line 27, in
from metagpt.memory.brain_memory import BrainMemory
File "F:\MetaGPT\metagpt\memory\brain_memory.py", line 23, in
from metagpt.utils.redis import Redis
File "F:\MetaGPT\metagpt\utils\redis.py", line 13, in
import aioredis # https://aioredis.readthedocs.io/en/latest/getting-started/
^^^^^^^^^^^^^^^
File "F:\anacoda\envs\metagpt\Lib\site-packages\aioredis__init__.py", line 1, in
from aioredis.client import Redis, StrictRedis
File "F:\anacoda\envs\metagpt\Lib\site-packages\aioredis\client.py", line 32, in
from aioredis.connection import (
File "F:\anacoda\envs\metagpt\Lib\site-packages\aioredis\connection.py", line 33, in
from .exceptions import (
File "F:\anacoda\envs\metagpt\Lib\site-packages\aioredis\exceptions.py", line 14, in
class TimeoutError(asyncio.TimeoutError, builtins.TimeoutError, RedisError):
TypeError: duplicate base class TimeoutError