Skip to content

Commit

Permalink
Update completions_streaming.py
Browse files Browse the repository at this point in the history
- lint fix; debug exception removal
  • Loading branch information
mmikita95 committed Jun 28, 2024
1 parent cb406ce commit 521c12c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions examples/completions_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# $ rye sync --all-features
# $ WRITERAI_API_KEY="<your api key>" rye run python examples/completions_streaming.py

import random

from writerai import AsyncClient, BadRequestError


Expand All @@ -36,7 +34,7 @@ async def main() -> None:
async for response in stream_res:
print(f"< {response.value}")

except Exception as e:
except BadRequestError as e:
print(f"Error: {e.body}")


Expand Down

0 comments on commit 521c12c

Please sign in to comment.