Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -588,8 +588,8 @@ def list_models():
|
|
588 |
@app.route('/hf/v1/embeddings', methods=['POST'])
|
589 |
def embeddings():
|
590 |
data = request.get_json()
|
591 |
-
model_input = data.get("input"
|
592 |
-
model = data.get("model")
|
593 |
if not model_input:
|
594 |
return jsonify({"error": "没有提供输入"}), 400
|
595 |
|
|
|
588 |
@app.route('/hf/v1/embeddings', methods=['POST'])
|
589 |
def embeddings():
|
590 |
data = request.get_json()
|
591 |
+
model_input = data.get("input")
|
592 |
+
model = data.get("model", "text-embedding-004")
|
593 |
if not model_input:
|
594 |
return jsonify({"error": "没有提供输入"}), 400
|
595 |
|