Skip to content
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

[BUG] Majority Voting #514

Open
evelynmitchell opened this issue Jun 25, 2024 · 1 comment
Open

[BUG] Majority Voting #514

evelynmitchell opened this issue Jun 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@evelynmitchell
Copy link
Contributor

evelynmitchell commented Jun 25, 2024

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
[<ipython-input-15-8a50099c58fe>](https://localhost:8080/#) in <cell line: 1>()
----> 1 from swarms import Agent, MajorityVoting, ChromaDB, Anthropic
      2 
      3 # Initialize the llm
      4 llm = Anthropic()
      5 

ImportError: cannot import name 'ChromaDB' from 'swarms' (/usr/local/lib/python3.10/dist-packages/swarms/__init__.py)

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------```
@evelynmitchell evelynmitchell added the bug Something isn't working label Jun 25, 2024
@sambhavnoobcoder
Copy link
Contributor

To solve this issue, we need to update the import statement. The ChromaDB class is not directly importable from the swarms package. Instead, it should be imported from swarms_memory . Here's how to fix the import:

from swarms import Agent, MajorityVoting
from swarms_memory import ChromaDB
from swarm_models import Anthropic

# Initialize the llm
llm = Anthropic()

you can reference this usage from the swarms/memory/diy_memory.md as well as swarms/agent_with_rag.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants