-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run when role is assistant #1329
Comments
and this is what happend when role is customer_service Traceback:(metagpt) PS F:\MetaGPT> python F:\MetaGPT\test.py |
For assistant: If using python>=3.11 this would be the issue, aio-libs-abandoned/aioredis-py#1409 For customer_service: |
… to be synchronous
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
The text was updated successfully, but these errors were encountered: