Skip to content

Commit

Permalink
Update chatbotv3.py
Browse files Browse the repository at this point in the history
  • Loading branch information
liufufa committed Mar 21, 2023
1 parent 142e258 commit e23a775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chatbotv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ def ask_stream(
},
stream=True,
)
print(response)
if response.status_code != 200:
raise Exception(
f"Error: {response.status_code} {response.reason} {response.text}",
)
response_role: str = None
full_response: str = ""
print(response)
for line in response.iter_lines():
if not line:
continue
Expand Down

0 comments on commit e23a775

Please sign in to comment.