hi! trying to get a CustomQueryEngine going, following
https://gpt-index.readthedocs.io/en/latest/examples/query_engine/custom_query_engine.htmlHow do I make the response streaming capable -- does the following look right? :
def custom_query(self, query_str: str):
logger.info(f"Triggering custom engine for query: {query_str}")
response_gen = self.llm.stream_complete(
qa_prompt
)
response= StreamingResponse(response_gen)
return response
however, this creates following error upstream (integration with chainlit).
await response_message.stream_token(token=token)
TypeError: can only concatenate str (not "CompletionResponse") to str
Any help appreciated! thanks