HuggingFace Embeddings not getting generated on weaviate

I get the below error while uploading my data on Weaviate using HuggingFace API to generate the embeddings.

Code:

vector_store = WeaviateVectorStore(
                    weaviate_client=client, 
                    index_name="LlamaIndex", 
                    text_key="text"
                )
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex.from_documents(
            documents, 
            storage_context=storage_context, 
            show_progress=True
        )

Error:

What changes should I make to resolve the error?

Hi @wolv3rine1304 ! Welcome to our community :hugs:

I have not played with llamaindex too much by now, but I believe that you never specify the llm.

So llamaindex is assuming that you will be using openai.

Check here for example, how it sepecifies cohere as the chosen llm:

https://docs.llamaindex.ai/en/stable/examples/embeddings/cohereai.html#load-data

Let me know if this helps :slight_smile:

I moved on to using langchain but will definitely give this a try. Thanks for the reply.