Skip to content

Commit

Permalink
🐛 Bug: Fix the bug where OpenAI's asynchronous interface error does n…
Browse files Browse the repository at this point in the history
…ot read the response.
  • Loading branch information
yym68686 committed Oct 10, 2024
1 parent 12bb1b3 commit a09686d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="modelmerge",
version="0.11.54",
version="0.11.55",
description="modelmerge is a multi-large language model API aggregator.",
long_description=Path.open(Path("README.md"), encoding="utf-8").read(),
long_description_content_type="text/markdown",
Expand Down
1 change: 1 addition & 0 deletions src/ModelMerge/models/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ async def ask_stream_async(
# }
# continue
if response.status_code != 200:
await response.aread()
raise Exception(f"{response.status_code} {response.reason_phrase} {response.text[:400]}")
else:
raise Exception(f"response is None, please check the connection or network.")
Expand Down

0 comments on commit a09686d

Please sign in to comment.