whats going on

This commit is contained in:
Cyberes 2023-09-23 21:10:14 -06:00
parent 94e845cd1a
commit 7ee2311183
1 changed files with 2 additions and 1 deletions

View File

@ -70,8 +70,9 @@ def stream(ws):
if partial_response.endswith(b'\x00'):
json_str = partial_response[:-1].decode() # Remove the null character and decode the byte string to a string
json_obj = json.loads(json_str)
if not len(json_obj['text'][0].split(input_prompt + generated_text)):
if len(json_obj['text'][0].split(input_prompt + generated_text)) > 2:
# ????
print(json_obj)
continue
new = json_obj['text'][0].split(input_prompt + generated_text)[1]