Update api1.py
Browse files
api1.py
CHANGED
@@ -178,8 +178,8 @@ def make_resData_stream(data, chat=False, time_now = 0, start=False):
|
|
178 |
@app.route('/chat/completions', methods=['POST'])
|
179 |
@app.route('/v1/chat/completions', methods=['POST'])
|
180 |
def chat_completions():
|
181 |
-
|
182 |
-
|
183 |
body = request.get_json()
|
184 |
stream = False
|
185 |
tokenize = False
|
@@ -214,8 +214,8 @@ def chat_completions():
|
|
214 |
@app.route('/completions', methods=['POST'])
|
215 |
@app.route('/v1/completions', methods=['POST'])
|
216 |
def completion():
|
217 |
-
|
218 |
-
|
219 |
body = request.get_json()
|
220 |
stream = False
|
221 |
tokenize = False
|
|
|
178 |
@app.route('/chat/completions', methods=['POST'])
|
179 |
@app.route('/v1/chat/completions', methods=['POST'])
|
180 |
def chat_completions():
|
181 |
+
#if (args.api_key != "" and request.headers["Authorization"].split()[1] != args.api_key):
|
182 |
+
# return Response(status=403)
|
183 |
body = request.get_json()
|
184 |
stream = False
|
185 |
tokenize = False
|
|
|
214 |
@app.route('/completions', methods=['POST'])
|
215 |
@app.route('/v1/completions', methods=['POST'])
|
216 |
def completion():
|
217 |
+
#if (args.api_key != "" and request.headers["Authorization"].split()[1] != args.api_key):
|
218 |
+
# return Response(status=403)
|
219 |
body = request.get_json()
|
220 |
stream = False
|
221 |
tokenize = False
|