Update app.py
Browse files
app.py
CHANGED
|
@@ -913,7 +913,7 @@ def handsome_images_generations():
|
|
| 913 |
json=siliconflow_data,
|
| 914 |
timeout=120
|
| 915 |
)
|
| 916 |
-
|
| 917 |
if response.status_code == 429:
|
| 918 |
return jsonify(response.json()), 429
|
| 919 |
|
|
@@ -946,7 +946,6 @@ def handsome_images_generations():
|
|
| 946 |
logging.error(f"无效的图片数据: {item}")
|
| 947 |
openai_images.append({"url": item})
|
| 948 |
|
| 949 |
-
|
| 950 |
response_data = {
|
| 951 |
"created": int(time.time()),
|
| 952 |
"data": openai_images
|
|
@@ -1426,7 +1425,7 @@ def handsome_chat_completions():
|
|
| 1426 |
except requests.exceptions.RequestException as e:
|
| 1427 |
logging.error(f"请求转发异常: {e}")
|
| 1428 |
return jsonify({"error": str(e)}), 500
|
| 1429 |
-
|
| 1430 |
if __name__ == '__main__':
|
| 1431 |
import json
|
| 1432 |
logging.info(f"环境变量:{os.environ}")
|
|
|
|
| 913 |
json=siliconflow_data,
|
| 914 |
timeout=120
|
| 915 |
)
|
| 916 |
+
|
| 917 |
if response.status_code == 429:
|
| 918 |
return jsonify(response.json()), 429
|
| 919 |
|
|
|
|
| 946 |
logging.error(f"无效的图片数据: {item}")
|
| 947 |
openai_images.append({"url": item})
|
| 948 |
|
|
|
|
| 949 |
response_data = {
|
| 950 |
"created": int(time.time()),
|
| 951 |
"data": openai_images
|
|
|
|
| 1425 |
except requests.exceptions.RequestException as e:
|
| 1426 |
logging.error(f"请求转发异常: {e}")
|
| 1427 |
return jsonify({"error": str(e)}), 500
|
| 1428 |
+
|
| 1429 |
if __name__ == '__main__':
|
| 1430 |
import json
|
| 1431 |
logging.info(f"环境变量:{os.environ}")
|