Find answers from the community

L
Lukas
Offline, last seen 3 months ago
Joined September 25, 2024
L
Lukas
·

L9ad

Hi there! I am trying to load data that have been persisted to disk, like so:
index.storage_context.persist(persist_dir="<persist_dir>")

The index has been built using the embedding model from Cohere, as detailed in the documentation.

embed_model = CohereEmbedding( cohere_api_key=COHERE_API_KEY, model_name="embed-english-v3.0", input_type="search_document", embedding_type="float")

index = VectorStoreIndex.from_documents( documents=documents, embed_model=embed_model)

The vector store index (in-memory) is working; however, I am unable to load the data and re-create the storage context using
storage_context = StorageContext.from_defaults(persist_dir

Would anybody be able to help with the configuration for Cohere? I understand that I can then load the indexusing the following fucntion:
index = load_index_from_storage(storage_context)
Many thanks!
2 comments
L
L