Skip to content

Commit 174a5fe

Browse files
authored
Update API example
1 parent 5a8a079 commit 174a5fe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ Example:
7474
>>> status = client.get_status(job_id)
7575
>>> if status.status == ModelStatus.READY:
7676
... print(f"Model is ready at {status.base_url}")
77+
>>> # Alternatively, use wait_until_ready which will either return a StatusResponse or throw a ServerError
78+
>>> try:
79+
>>> status = wait_until_ready(job_id)
80+
>>> except ServerError as e:
81+
>>> print(f"Model launch failed: {e}")
7782
>>> client.shutdown_model(job_id)
7883
```
7984

0 commit comments

Comments
 (0)