Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Commit

Permalink
oops. close #1467
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio committed Jul 20, 2023
1 parent f2d3803 commit ec979fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/revChatGPT/V1.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@ def __send_request(
if not self.__check_fields(line):
if line.get("is_completion"):
raise ValueError(f"Field missing. Details: {str(line)}")
continue
if line.get("message").get("author").get("role") != "assistant":
continue

Expand Down Expand Up @@ -1141,10 +1142,11 @@ async def __send_request(
line = json.loads(line)
except json.decoder.JSONDecodeError:
continue

if not self.__check_fields(line):
if line.get("is_completion"):
raise ValueError(f"Field missing. Details: {str(line)}")
continue
if line.get("message").get("author").get("role") != "assistant":
continue

Expand Down

0 comments on commit ec979fb

Please # to comment.