Find answers from the community

Updated 7 months ago

Hi Everyone, is there a way through

Hi Everyone, is there a way through which i can see what context was fetched and what's the formatted prompt when i run
query_engine.query(".....")
W
l
4 comments
Yes, you can find this in response object.

Plain Text
response = query_engine.query(...)
for resp in response:
  print(resp) # This will show the nodes used to generate this response.
Response object is not an iterable it's just a string so this doesn't work
response.response is string. Can you check one more time
Plain Text
query_engine = SubQuestionQueryEngine.from_defaults(
    query_engine_tools=query_engine_tools,
    use_async=True
    
)
response = query_engine.query(...)


I'm doing this i get response as string
Add a reply
Sign up and join the conversation on Discord