print json
This commit is contained in:
parent
41f7a5004a
commit
93e69abe12
1 changed files with 1 additions and 7 deletions
|
@ -165,6 +165,7 @@ def chat_completions():
|
|||
|
||||
if (not stream):
|
||||
data = requests.request("POST", urllib.parse.urljoin(args.llama_api, "/completion"), data=json.dumps(postData))
|
||||
print(data.json())
|
||||
resData = make_resData(data.json(), chat=True, promptToken=promptToken)
|
||||
return jsonify(resData)
|
||||
else:
|
||||
|
@ -214,12 +215,5 @@ def completion():
|
|||
yield 'data: {}\n'.format(json.dumps(resData))
|
||||
return Response(generate(), mimetype='text/event-stream')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(args.host, port=args.port)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue