index = GPTListIndex.load_from_disk('./index.json')
max_input_size = 4096
num_output = 256
max_chunk_overlap = 50
prompt_helper = PromptHelper(max_input_size, num_output, max_chunk_overlap)
llm_predictor = LLMPredictor(llm=OpenAI(temperature=0, model_name="text-davinci-002"))
service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor)
response = index.query(query_str, mode="default", response_mode="default",service_context=service_context)
Got a larger chunk overlap (200) than chunk size (-2877), should be smaller.
PDFReader = download_loader("PDFReader")
loader = PDFReader()
document1 = loader.load_data(file=Path('./file1.pdf'))
document2 = loader.load_data(file=Path('./file2.pdf'))
graph_builder = QASummaryGraphBuilder(service_context=service_context_gpt4)
graph = graph_builder.build_graph_from_documents(documents=[document1, document2])
'list' object has no attribute 'get_text'