chromadb.errors.NoIndexException: Index not found, please create an instance before querying #2901
-
What does this mean? How can I load the following index?
From the following code snippet:
Reference: |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I'm also having the same problem, reloading the chroma db from disk doesn't contain any index |
Beta Was this translation helpful? Give feedback.
-
from langchain.indexes import VectorstoreIndexCreator TRY THIS |
Beta Was this translation helpful? Give feedback.
-
Alternatively use GPTIndexingdef construct_index(directory_path): set maximum input sizemax_input_size = 4096 set number of output tokensnum_outputs = 256 set maximum chunk overlapmax_chunk_overlap = 20 set chunk size limitchunk_size_limit = 600 prompt_helper = PromptHelper(max_input_size, num_outputs, max_chunk_overlap, chunk_size_limit=chunk_size_limit) define LLMllm_predictor = LLMPredictor(llm=OpenAI(temperature=0, model_name="text-davinci-003", max_tokens=num_outputs)) documents = SimpleDirectoryReader(directory_path).load_data() service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor) index.save_to_disk('index.json') return index |
Beta Was this translation helpful? Give feedback.
-
@allen-munsch
to load it try doing this
|
Beta Was this translation helpful? Give feedback.
@allen-munsch
whenever you create an index do this
to load it try doing this