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] ImportError: cannot import name 'ChromaDB' #477

Open
behroozazarkhalili opened this issue May 27, 2024 · 4 comments
Open

[BUG] ImportError: cannot import name 'ChromaDB' #477

behroozazarkhalili opened this issue May 27, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@behroozazarkhalili
Copy link

behroozazarkhalili commented May 27, 2024

Describe the bug

ImportError: cannot import name 'ChromaDB' from 'swarms' (/home/ermia/anaconda3/envs/deep-shap/lib/python3.10/site-packages/swarms/__init__.py)

To Reproduce
Steps to reproduce the behavior:
Here's the code I'm running:

from swarms import Agent, ChromaDB, OpenAIChat

# Making an instance of the ChromaDB class
memory = ChromaDB(
    metric="cosine",
    n_results=3,
    output_dir="results",
    docs_folder="docs",
)

# Initializing the agent with the Gemini instance and other parameters
agent = Agent(
    agent_name="Covid-19-Chat",
    agent_description=(
        "This agent provides information about COVID-19 symptoms."
    ),
    llm=OpenAIChat(),
    max_loops="auto",
    autosave=True,
    verbose=True,
    long_term_memory=memory,
    stopping_condition="finish",
)

# Defining the task and image path
task = ("What are the symptoms of COVID-19?",)

# Running the agent with the specified task and image
out = agent.run(task)
print(out)

Expected behavior
It should run without any errors as it is an example in the readme.md of the repository.

Screenshots
image

Additional context

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@behroozazarkhalili behroozazarkhalili added the bug Something isn't working label May 27, 2024
Copy link

Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap.

@kyegomez
Copy link
Owner

@behroozazarkhalili this code was taken out of the main swarms package to reduce redundancy, you can import it from here:

https://github.com/kyegomez/swarms/blob/master/playground/memory/chroma_db.py

@behroozazarkhalili
Copy link
Author

@behroozazarkhalili this code was taken out of the main swarms package to reduce redundancy, you can import it from here:

https://github.com/kyegomez/swarms/blob/master/playground/memory/chroma_db.py
It is not the correct way to remove the bug. I think we should update the readme file to effectively handle this bug.

@kyegomez
Copy link
Owner

kyegomez commented Jun 3, 2024

@behroozazarkhalili the code example has been removed! Let me know if you have any other questions!

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

2 participants