mirror of
https://github.com/Yanyutin753/RefreshToV1Api.git
synced 2025-10-14 23:22:42 +00:00
优化请求
This commit is contained in:
4
main.py
4
main.py
@@ -2279,6 +2279,8 @@ def chat_completions():
|
||||
accessible_model_list = get_accessible_model_list()
|
||||
if model not in accessible_model_list and not 'gpt-4-gizmo-' in model:
|
||||
return jsonify({"error": "model is not accessible"}), 401
|
||||
elif 'gpt-4-gizmo-' in model and not KEY_FOR_GPTS_INFO:
|
||||
return jsonify({"error": "key_for_gpts_info is not accessible"}), 400
|
||||
|
||||
stream = data.get('stream', False)
|
||||
|
||||
@@ -2441,6 +2443,8 @@ def images_generations():
|
||||
accessible_model_list = get_accessible_model_list()
|
||||
if model not in accessible_model_list and not 'gpt-4-gizmo-' in model:
|
||||
return jsonify({"error": "model is not accessible"}), 401
|
||||
elif 'gpt-4-gizmo-' in model and not KEY_FOR_GPTS_INFO:
|
||||
return jsonify({"error": "key_for_gpts_info is not accessible"}), 400
|
||||
|
||||
prompt = data.get('prompt', '')
|
||||
|
||||
|
Reference in New Issue
Block a user