Update app.py
Browse files
app.py
CHANGED
@@ -1158,7 +1158,7 @@ def handsome_chat_completions():
|
|
1158 |
def generate():
|
1159 |
first_chunk_time = None
|
1160 |
full_response_content = ""
|
1161 |
-
for chunk in response.iter_content(chunk_size=
|
1162 |
if chunk:
|
1163 |
if first_chunk_time is None:
|
1164 |
first_chunk_time = time.time()
|
@@ -1338,14 +1338,8 @@ def handsome_chat_completions():
|
|
1338 |
return jsonify({"error": str(e)}), 500
|
1339 |
|
1340 |
if __name__ == '__main__':
|
1341 |
-
import json
|
1342 |
logging.info(f"环境变量:{os.environ}")
|
1343 |
|
1344 |
-
invalid_keys_global = []
|
1345 |
-
free_keys_global = []
|
1346 |
-
unverified_keys_global = []
|
1347 |
-
valid_keys_global = []
|
1348 |
-
|
1349 |
load_keys()
|
1350 |
logging.info("程序启动时首次加载 keys 已执行")
|
1351 |
|
|
|
1158 |
def generate():
|
1159 |
first_chunk_time = None
|
1160 |
full_response_content = ""
|
1161 |
+
for chunk in response.iter_content(chunk_size=2048):
|
1162 |
if chunk:
|
1163 |
if first_chunk_time is None:
|
1164 |
first_chunk_time = time.time()
|
|
|
1338 |
return jsonify({"error": str(e)}), 500
|
1339 |
|
1340 |
if __name__ == '__main__':
|
|
|
1341 |
logging.info(f"环境变量:{os.environ}")
|
1342 |
|
|
|
|
|
|
|
|
|
|
|
1343 |
load_keys()
|
1344 |
logging.info("程序启动时首次加载 keys 已执行")
|
1345 |
|