policies_storage_context = StorageContext.from_defaults( persist_dir="./custom-knowledge-base") policies_index = load_index_from_storage(policies_storage_context) policies_engine = policies_index.as_query_engine(similarity_top_k=10) memory = ChatMemoryBuffer.from_defaults(token_limit=1500) chat_engine = policies_index.as_chat_engine( memory=memory, chat_mode="condense_question", ) response = chat_engine.chat(text)
What was my previous question