whats going on
This commit is contained in:
parent
94e845cd1a
commit
7ee2311183
|
@ -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]
|
||||
|
|
Reference in New Issue