DEBSOURCES
Skip Quicknav
sources / ollama-python / 0.5.3-1 / examples / generate-stream.py
1234
from ollama import generate for part in generate('gemma3', 'Why is the sky blue?', stream=True): print(part['response'], end='', flush=True)