Skip to content

Commit

Permalink
💻 Code: Optimize log display
Browse files Browse the repository at this point in the history
  • Loading branch information
yym68686 committed Oct 9, 2024
1 parent 20c329d commit 12bb1b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
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.53",
version="0.11.54",
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
6 changes: 2 additions & 4 deletions src/ModelMerge/models/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,7 @@ def ask_stream(
line = line.decode("utf-8")
if not line or line.startswith(':'):
continue
if self.print_log:
print(line)
# print(line)
if line.startswith('data:'):
line = line.lstrip("data: ")
if line == "[DONE]":
Expand Down Expand Up @@ -718,8 +717,7 @@ async def ask_stream_async(
line = line.strip()
if not line or line.startswith(':'):
continue
if self.print_log:
print(line)
# print(line)
if line.startswith('data:'):
line = line.lstrip("data: ")
if line == "[DONE]":
Expand Down

0 comments on commit 12bb1b3

Please sign in to comment.