Find answers from the community

Updated 3 months ago

SubQuestionQueryEngine.from_defaults

Hi, I am a beginner in llama_index. When I use SubQuestionQueryEngine.from_defaults(query_engine_tools=query_engine_tools) and add verbose=False to avoid output I get the error message 'free variable 'colors' referenced before assignment in enclosing scope':
How can I avoid this. Thanks
D
L
7 comments
can someone help me?
this is a bug, use verbose=True for now, I'll have to merge a fix shortly
You can use your doc example:
https://gpt-index.readthedocs.io/en/latest/examples/usecases/10k_sub_question.html
You can change in paragraph "Build query engines":
s_engine = SubQuestionQueryEngine.from_defaults(query_engine_tools=query_engine_tools)
to
SubQuestionQueryEngine.from_defaults(query_engine_tools=query_engine_tools, verbose = False)
Just merged a fix for this earlier today. It'll be in the next pypi release, or you can install from source to get it now
I implemented the modification into my installation - it works fine.
Thanks Logan
Add a reply
Sign up and join the conversation on Discord