EntityExtractor for some reason does not wxtract any entities for me. I have installed the span-marker, nltk and punks. Metadata stays empty. What can I check? I'm using it with a long txt file with content.
And I also have a weird error with a very basic hugingface embeddings example. Here is the code: from langchain.embeddings import HuggingFaceEmbeddings from llama_index.embeddings import LangchainEmbedding
text = "Wonderful day" embed_model = LangchainEmbedding( HuggingFaceEmbeddings("sentence-transformers/all-mpnet-base-v2") )
embedding = embed_model.get_text_embedding(text)
print(embedding) I get an error in this line: HuggingFaceEmbeddings("sentence-transformers/all-mpnet-base-v2")... init() takes 1 positional argument but 2 were given Am I missing something? I just upgraded llamaindex
I found the problem with embeddings. Your documentation has a little error. Here: https://gpt-index.readthedocs.io/en/stable/examples/embeddings/Langchain.html It should be HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2") instead of: HuggingFaceEmbeddings("sentence-transformers/all-mpnet-base-v2")
the May I have just one little question? I'm playing with chroma. Is this a good way to add embeddings to chroma collection? I've never used chroma before 😊 : collection.add( embeddings=[embed_model.get_text_embedding("No one is born with an instruction manual"), embed_model.get_text_embedding("You can’t read someone else’s mind"), embed_model.get_text_embedding("Say what you mean and mean what you say")], documents=["No one is born with an instruction manual", "You can’t read someone else’s mind", "Say what you mean and mean what you say"], metadatas=[{"source": "life experience"}, {"source": "life experience"}, {"source": "life experience"}], ids=["id1", "id2", "id3"] )