parent
c7047d7353
commit
921406f721
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ def generate(prompt, context):
|
||||||
for line in r.iter_lines():
|
for line in r.iter_lines():
|
||||||
body = json.loads(line)
|
body = json.loads(line)
|
||||||
response_part = body.get('response', '')
|
response_part = body.get('response', '')
|
||||||
# the response streams one token at a time, print that as we recieve it
|
# the response streams one token at a time, print that as we receive it
|
||||||
print(response_part, end='', flush=True)
|
print(response_part, end='', flush=True)
|
||||||
|
|
||||||
if 'error' in body:
|
if 'error' in body:
|
||||||
|
|
Loading…
Reference in a new issue