Streaming
Learn how Flowise streaming works
Using Python/TS Library
from flowise import Flowise, PredictionData
def test_streaming():
client = Flowise()
# Test streaming prediction
completion = client.create_prediction(
PredictionData(
chatflowId="<flow-id>",
question="Tell me a joke!",
streaming=True
)
)
# Process and print each streamed chunk
print("Streaming response:")
for chunk in completion:
# {event: "token", data: "hello"}
print(chunk)
if __name__ == "__main__":
test_streaming()Event
Description
Streamlit App
Last updated