Stream

Simulating "Live" Typing with Streaming

Enable streaming (stream=True) to receive responses in parts, creating a real-time typing effect:

from zerogpt import Client

client = Client()
for msg in client.send_message('Hello', stream=True):
    print(msg, flush=True, end='')

This approach is particularly useful for animated input interfaces or console applications.

Last updated

Was this helpful?