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

vectordb = Chroma.from_documents(texts, embeddings) is giving error! #2

Open
Nisar-MLNLP opened this issue Feb 22, 2023 · 8 comments
Open

Comments

@Nisar-MLNLP
Copy link

image

@Sunil-1234
Copy link

Please help me with the same error.
Whenever I am trying for the first time it runs but for the second time it is throwing the above error.
Please help me fix this ASAP.

@Nandan-Jha
Copy link

Please help me with same error.
Everytime,I restart the notebook,it is throwing same error.

@Sunil-1234
Copy link

This code works for me second time again after restarting it throw same error
class MyDocument:
def init(self, text, metadata=None):
self.text = text
self.metadata = metadata
self.page_content = text # add this line to define page_content attribute
metadata = [{'source': str(i)} for i in range(len(texts))]
documents = [MyDocument(text, metadata=metadata[i]) for i, text in enumerate(texts)]
docsearch = Chroma.from_documents(documents, embeddings)

@tomviner
Copy link

The square bracket for builtin types syntax (list[str]) only works from Python 3.9 onwards.

This is fixed in chroma-core/chroma#160 just need to pip install 'chromadb>=0.3.5'

Or use at least Python 3.9

@tonmoyazad
Copy link

tonmoyazad commented Apr 4, 2023

How to solve this?

While Creating the Chain Getting ValidationError: 1 validation error for LLMChain
prompt
none is not an allowed value (type=type_error.none.not_allowed)

but when I run this on google colab everything works fine.

Please advice what could be the issue here?

image

@Sujan-Roy
Copy link

You can solve the problem by import the following library

from langchain.vectorstores.chroma import Chroma

I face the same problem. I solve my problem by importing the above library.
I hope it will be helpful for you.

@barbmarques
Copy link

barbmarques commented Apr 13, 2024

I continually get the following error, although I've run pip install chromadb on my Mac:

ImportError: Could not import chromadb python package. Please install it with pip install chromadb.

@godofecht
Copy link

Looks like they still haven't fixed it. Similar issue with from_texts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants