In the following code
def load_index():
# index if dir 'storage' does not exist
if not os.path.exists('storage'):
print('Building index...')
build_index()
storage_context = StorageContext.from_defaults(persist_dir='./storage')
# doc_hash_to_filename = json.load(open('doc_hash_to_filename.json', 'r'))
return load_index_from_storage(storage_context)
def ask_question(index, query):
query_engine = index.as_query_engine()
response = query_engine.query(query)
return response
I always get 2 responses right now, for any query. How can I get more? is there a parameter I can change?
I also posted this on Stack Overflow and as an issue on the repository - please let me know if there is an answer.