From 782d22fc6026d7ebaac0bb8709d3d08680c1cade Mon Sep 17 00:00:00 2001 From: nateraw Date: Tue, 26 Mar 2024 14:19:06 -0500 Subject: [PATCH] :memo: include stream=True in prediction stream snippet --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c1003566..e22fc9b0 100644 --- a/README.md +++ b/README.md @@ -119,9 +119,11 @@ This is helpful when you want the ID of the prediction separate from its output. ```python version = "02e509c789964a7ea8736978a43525956ef40397be9033abf9fd2badfe68c9e3" -prediction = replicate.predictions.create(version=version, input={ - "prompt": "Please write a haiku about llamas.", -}) +prediction = replicate.predictions.create( + version=version, + input={"prompt": "Please write a haiku about llamas."}, + stream=True, +) for event in prediction.stream(): print(str(event), end="")