add /v1/ endpoints binding
This commit is contained in:
parent
7dcffd7a03
commit
f713dd515d
1 changed files with 2 additions and 0 deletions
|
@ -143,6 +143,7 @@ def make_resData_stream(data, chat=False, time_now = 0, start=False):
|
|||
|
||||
|
||||
@app.route('/chat/completions', methods=['POST'])
|
||||
@app.route('/v1/chat/completions', methods=['POST'])
|
||||
def chat_completions():
|
||||
if (args.api_key != "" and request.headers["Authorization"].split()[1] != args.api_key):
|
||||
return Response(status=403)
|
||||
|
@ -177,6 +178,7 @@ def chat_completions():
|
|||
|
||||
|
||||
@app.route('/completions', methods=['POST'])
|
||||
@app.route('/v1/completions', methods=['POST'])
|
||||
def completion():
|
||||
if (args.api_key != "" and request.headers["Authorization"].split()[1] != args.api_key):
|
||||
return Response(status=403)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue