Hey there, been working with the subquestion query engine example comparing uber and lyft financial docs and running into some issues (and spammed kapa bot on it):
the index_1 and index_2 are base TreeIndex that I am able to query against individually. However when I run the code below I get the error at the bottom. Any clue?
I am attempting to build sub questions on two root tree indices and then refine the response in the end, similar to the uber and lyft example but just using tree index.
from llama_index.tools import QueryEngineTool, ToolMetadata
from llama_index.query_engine import SubQuestionQueryEngine
index_1 = indices_list[0].as_query_engine(retriever_mode = "root",use_async=True)
index_2 = indices_list[1].as_query_engine(retriever_mode = "root",use_async=True)
query_engine_tools = [
QueryEngineTool(
query_engine=index_1,
metadata=ToolMetadata(
name=list(loaded_indices.keys())[1].strip(".json"),
description=f'This is the earning transcripts for {list(loaded_indices.keys())[1].strip(".json")}',
),
),
QueryEngineTool(
query_engine=index_2,
metadata=ToolMetadata(
name=list(loaded_indices.keys())[2].strip(".json"),
description=f'This is the earning transcripts for {list(loaded_indices.keys())[2].strip(".json")}',
),
),
]
s_engine = SubQuestionQueryEngine.from_defaults(
query_engine_tools=query_engine_tools,
service_context=service_context
)
response = s_engine.query("Please compare the performance of these two companies")
Error:/opt/conda/lib/python3.8/site-packages/llama_index/question_gen/output_parser.py in format(
failed resolving arguments)
15 def format(self, prompt_template: str) -> str:
16 del prompt_template
---> 17 raise NotImplementedError()
NotImplementedError:
P.S I am on llama_index version 0.8.30