add petals streaming to docs

This commit is contained in:
ishaan-jaff
2023-10-02 09:04:34 -07:00
parent a4d135eef9
commit 2c77879822
+14
View File
@@ -25,6 +25,20 @@ response = completion(
print(response)
```
## Usage with Streaming
```python
response = completion(
model="petals/petals-team/StableBeluga2",
messages=[{ "content": "Hello, how are you?","role": "user"}],
stream=True
)
print(response)
for chunk in response:
print(chunk)
```
### Model Details
| Model Name | Function Call |