-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
from_documents function call results with "AttributeError: 'NoneType' object has no attribute 'embed'" #26631
Comments
I am trying to run RAG samples for a few weeks. Codes were running until pulling latest langchain-community. Codes run after downgrading to 0.2.17 Could you put the env information when the code breaks? I think the sys info you provided is for langchain_community: 0.2.17 |
System Information
Package Information
Optional packages not installed
Other Dependencies
|
I can second the observation: Latest "langchain_community" version breaks the "from_documents" call with the above mentioned error and downgrade to "langchain_community" = 0.2.17 solves the issue |
My current simple patch while waiting for the fix: from langchain_community.embeddings.fastembed import FastEmbedEmbeddings
embedding_model = FastEmbedEmbeddings(model_name="your_model_name")
if embedding_model._model is None:
embedding_model._model = embedding_model.model_extra['_model'] so no need to initialize it twice |
Checked other resources
Example Code
from langchain_community.vectorstores import Chroma
vector_store = Chroma.from_documents(documents=chunks, embedding=self.embedding, persist_directory="./chroma_db")
Error Message and Stack Trace (if applicable)
No response
Description
I am trying to run RAG samples for a few weeks. Codes were running until pulling latest langchain-community. Codes run after downgrading to 0.2.17
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
The text was updated successfully, but these errors were encountered: