phidatahq / phidata

Build AI Assistants with memory, knowledge and tools.
https://docs.phidata.com
Mozilla Public License 2.0
10.45k stars 1.51k forks source link

Storage Error #1004

Closed galaxygliese closed 3 weeks ago

galaxygliese commented 3 weeks ago

Hello, I faced this error when called from phi.storage.assistant.postgres import PgAssistantStorage. Phidata version is phidata==2.4.15

 File "/usr/local/lib/python3.9/site-packages/phi/assistant/assistant.py", line 30, in <module>
    from phi.storage.assistant import AssistantStorage
ImportError: cannot import name 'AssistantStorage' from partially initialized module 'phi.storage.assistant'
galaxygliese commented 3 weeks ago

I found the solution. I should have executed from phi.assistant import Assistant first.

from phi.assistant import Assistant
from phi.storage.assistant.postgres import PgAssistantStorage

Thank you.