Find answers from the community

Updated 3 months ago

Streaming

How to stream response but not printing it?
this
Plain Text
query_engine = index.as_query_engine(streaming=True)
streaming_response = query_engine.query("Who is Paul Graham.")
streaming_response.print_response_stream()


will print the output, I want to pass it to a chatbot
L
1 comment
You can get the raw response generator and iterate over it

for token in response.response_gen
Add a reply
Sign up and join the conversation on Discord