Skip to content
Discussion options

You must be logged in to vote

@allen-munsch
whenever you create an index do this

docsearch = Chroma.from_texts([t.page_content for t in texts], embeddings, collection_name=collection_name , persist_directory=f'db/{collection_name}')
docsearch.persist()
docsearch = None

to load it try doing this

vectorstore = Chroma(collection_name=f'{collection_name}',persist_directory=f'./db/{collection_name}',embedding_function=embeddings)
qa = VectorDBQA.from_chain_type(llm=OpenAI(temperature=0.2), chain_type="map_reduce", vectorstore=vectorstore,return_source_documents=False)

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@umair313
Comment options

@Hamas-ur-Rehman
Comment options

Answer selected by allen-munsch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants