import time documents = SimpleDirectoryReader(...) index = GPTSimpleVectorIndex([], embed_model=embed_model) for d in documents: index.insert(d) time.sleep(0.1)
retry_on_exceptions_with_backoff
in LLMPredictor in gpt_index.langchain_helpers.chain_wrapper.py
!LangchainEmbedding
could make sense? However, I may need to import the cohere.error.CohereError
specifically, if we don't want to just catch Exception
- but we don't currently have dependencies to cohere AFAIK.