Closed compilelife closed 7 months ago
while True: res = json.loads(wss.recv()) if res['header']['status'] == 2: break content = res['payload']['choices']['text'][0]['content'] yield content
当status为2的时候,payload还有有效数据
我也遇到些返回半拉数据的情况
把 if break这两行放在最下面就行
已修复~
当status为2的时候,payload还有有效数据