I have a Json file which has Dictionary type structure. I want to get chunks of its information followed by create embeddings.
I am getting this error while I create Embeddings:
from langchain_community.vectorstores import Chroma
from langchain_community.embeddings.ollama import OllamaEmbeddings
vectorstore = Chroma.from_documents(
documents=chunks,
embeddings_model = OllamaEmbeddings(base_url = "http://localhost:11434", model = "nomic-embed-text:latest")
)
the error is:
AttributeError: ‘str’ object has no attribute ‘page_content’
Could anyone suggest what can be the problem and how to solve it?
Note: I want to use Open source Embeddings model (not the paid one).
3