I saw you have a few months of experience. Are you using a
https://docs.python.org/3/library/venv.html virtualenv? Takes care of import errors, very good practice ๐
Here's my PromptHelper snippet
from langchain.embeddings.huggingface import HuggingFaceEmbeddings
from gpt_index import (
GPTSimpleVectorIndex,
SimpleDirectoryReader,
LangchainEmbedding,
PromptHelper,
)
prompt_helper = PromptHelper(4096, 256, 0)
embed_model = LangchainEmbedding(HuggingFaceEmbeddings())
index = GPTSimpleVectorIndex(
documents,
chunk_size_limit=chunk_size,
embed_model=embed_model,
prompt_helper=prompt_helper,
)