Find answers from the community

Updated 2 years ago

Embeddings

Anyone facing problems with custom embedding models? I have tried instructor embedding models and now sentence transformers, but none of them worked properly, even if running example notebooks. I always get different kinds of value errors. Like: ValueError: "HuggingFaceHubEmbeddings" object has no field "callback_manager"
If you have a currently working notebook I would really appreciate the code.
L
2 comments
How are you creating the embeddings?

When you use embeddings from langchain, you need to wrap them with our wrapper class

Plain Text
from llama_index.embedding.langchain import LangchainEmbedding

embed_model = LangchainEmbedding(HuggingFaceHubEmbeddings(..))

service_context = ServiceContext.from_defaults(embed_model=embed_model, ...)
Add a reply
Sign up and join the conversation on Discord