diff --git a/examples/server/api_like_OAI.py b/examples/server/api_like_OAI.py index 453e1ec04..4567f5eed 100755 --- a/examples/server/api_like_OAI.py +++ b/examples/server/api_like_OAI.py @@ -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)