KnowledgeGraphQueryEngine
. So whenever I am trying to run a query using the KnowledgeGraphQueryEngine
, I am continuously getting this error:pydantic.v1.error_wrappers.ValidationError: 1 validation error for LLMPredictStartEvent template none is not an allowed value (type=type_error.none.not_allowed)
query_engine = KnowledgeGraphQueryEngine( storage_context=storage_context, llm=llm, verbose=True, ) response = query_engine.query("Tell me about Peter Quill?")
Got a larger chunk overlap (-3) than chunk size (-39), should be smaller.
def initialize_index(): global index llm_predictor = HuggingFaceLLMPredictor( max_input_size=512, max_new_tokens=512, tokenizer_name="facebook/opt-iml-max-1.3b", model_name="facebook/opt-iml-max-1.3b", model_kwargs={"load_in_8bit": True}, generate_kwargs={ "do_sample": True, "top_k": 4, "penalty_alpha": 0.6, } ) prompt_helper = PromptHelper(context_window=512, chunk_size_limit=256, num_output=512) embed_model = LangchainEmbedding(HuggingFaceEmbeddings()) service_context = ServiceContext.from_defaults(llm_predictor=llm_predictor, embed_model=embed_model, prompt_helper=prompt_helper) if os.path.exists("../indices"): storage_context = StorageContext.from_defaults(persist_dir="../indices") index = load_index_from_storage(storage_context=storage_context, service_context=service_context) else: storage_context = StorageContext.from_defaults() documents = SimpleDirectoryReader("../data").load_data() index = GPTListIndex.from_documents(documents=documents, service_context=service_context, storage_context=storage_context) index.set_index_id("paul_graham_essay") index.storage_context.persist("../indices") return index, service_context