Expected EmbeddingFunction.__call__ to have the following signature: odict_keys(['self', 'input']), got odict_keys(['self', 'args', 'kwargs'])

#23
by herMaster - opened

I used the proper wrapper to download the model, but now I am getting the embedding_function error in Chromadb. I did -

loaded the jina model -

from langchain.embeddings import HuggingFaceEmbeddings

model_name = "jinaai/jina-embeddings-v2-base-en"
model_kwargs = {'device': 'cuda'}
encode_kwargs = {'normalize_embeddings': True}
model = HuggingFaceEmbeddings(
model_name=model_name,
model_kwargs=model_kwargs,
encode_kwargs=encode_kwargs
)

chroma settings -

from chromadb.config import Settings

CHROMA_SETTINGS = Settings(
anonymized_telemetry=False,
is_persistent=True,
)

Creating the persist directory -

persist_directory = 'db'
embedding = model

vectordb = Chroma.from_documents(documents=texts,
embedding=embedding,
persist_directory=persist_directory,
client_settings=CHROMA_SETTINGS)

error in above step -

Expected EmbeddingFunction.call to have the following signature: odict_keys(['self', 'input']), got odict_keys(['self', 'args', 'kwargs'])

Jina AI org
jupyterjazz changed discussion status to closed

Sign up or log in to comment