Replies: 5 comments
-
🤖 Hi there, Based on the information provided, it seems like you're trying to use the The query_engine = RetrieverQueryEngine.from_args(
retriever=my_retriever,
streaming=True,
...
) After setting up the streaming_response = query_engine.query(
"What did the author do growing up?",
) You can then obtain a for text in streaming_response.response_gen:
# do something with text as they arrive. Or, if you just want to print the text as they arrive: streaming_response.print_response_stream() Please note that the LLM you use must support streaming. Currently, streaming is supported by If you're trying to use the I hope this helps! Let me know if you have any other questions. Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
@rolandgvc hmm, looks like it's not possible at the moment. Ideally, the code would be using an actual response synthesizer here, and not Would need a PR to fix |
Beta Was this translation helpful? Give feedback.
-
Thanks @logan-markewich . Do you mind creating the PR, I'm not very familiar with the inner workings of the classes. Would this enable streaming right away or does it need additional changes? |
Beta Was this translation helpful? Give feedback.
-
Hi, is this being actively worked on? I have similar problem with enabling streaming with SQLTableRetrieverQueryEngine |
Beta Was this translation helpful? Give feedback.
-
@birudeghi yea not being actively worked on yet. As mentioned above, ideally it would use a response synthesizer. I highly encourage a contribution if you need it now 🙏🏻 |
Beta Was this translation helpful? Give feedback.
-
Question Validation
Question
Here is my current code
however, I can't get the
StreamingResponse
output out ofquery_engine.query
. Any ideas how I could get the streaming functionality working here?Beta Was this translation helpful? Give feedback.
All reactions