response = agent.stream_chat("Hello!") for token in response.response_gen: print(token, end="", flush=True)