I am trying to replicate an online tutorial from Deeplearning.ai. WHen I try to create a vector db with Chroma I run in the following error:
ValueError: Expected EmbeddingFunction.__call__ to have the following signature: odict_keys(['self', 'input']), got odict_keys(['self', 'args', 'kwargs'])
Please see https://docs.trychroma.com/embeddings for details of the EmbeddingFunction interface.
Please note the recent change to the EmbeddingFunction interface: https://docs.trychroma.com/migration#migration-to-0416---november-7-2023
I am not sure how to go about and fix it after seeing the mentioned docs.
This is the code:
from langchain_openai import OpenAIEmbeddings
embedding = OpenAIEmbeddings()
vectordb = Chroma.from_documents(
documents=documents,
embedding=embedding,
persist_directory=persist_directory
)