We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f8dcda commit 348bd29Copy full SHA for 348bd29
README.md
@@ -114,6 +114,19 @@ for event in replicate.stream(
114
print(str(event), end="")
115
```
116
117
+You can also stream the output of a prediction you create.
118
+This is helpful when you want the ID of the prediction separate from its output.
119
+
120
+```python
121
+version = "02e509c789964a7ea8736978a43525956ef40397be9033abf9fd2badfe68c9e3
122
+prediction = replicate.predictions.create(version=version, input={
123
+ "prompt": "Please write a haiku about llamas.",
124
+})
125
126
+for event in prediction.stream():
127
+ print(str(event), end="")
128
+```
129
130
For more information, see
131
["Streaming output"](https://replicate.com/docs/streaming) in Replicate's docs.
132
0 commit comments