Find answers from the community

Updated 12 months ago

SubQuestionQueryEngine: is there any way

At a glance

The community members are discussing how to stream the intermediate steps of the SubQuestionQueryEngine, similar to how it is done for agents. One community member mentions using a custom callback handler in their SEC-Insights app to grab the sub-questions/answers and send them to the frontend. Another community member tried to add the callback manager to the SubQuestionQueryEngine but encountered an issue. They later discovered that it works if the callback manager is added to the global service context, but this approach is now deprecated. The community members are trying to figure out where to intercept the events to stream the sub-questions/answers.

SubQuestionQueryEngine: is there any way to stream the intermediate steps like for agents?
L
B
8 comments
In our SEC-Insights app, we used a custom callback handler to grab the sub-questions/answers and send them to the frontend when they appeared
it's applied on the openaiagent from what I see
I tried to add it but I get: SubQuestionQueryEngine.from_defaults() got an unexpected keyword argument 'callback_manager'
Tried to add it to the indexes fed as tools, no trace
oh my bad, it works if I add it to the global service context
which is deprecated now haha
but where would I intercept those event to stream them then?
I believe how SEC-Insights did it was just send a server-side event to the frontend with the subquestion info, all inside the custom callback
I might be wrong, I haven't looked in a bit
Add a reply
Sign up and join the conversation on Discord