from llama_index.core import get_response_synthesizer synthesizer = get_response_synthesizer(response_mode="compact", llm=llm, ...)
synthesizer = get_response_synthesizer(response_mode="compact", llm=llm, streaming=True, ...) response = synthesizer.get_response(blah blah) for token in response: print(token, end="", flush=True)