8e
commited on
Commit
·
c4f87f9
1
Parent(s):
2a81db1
修改uri
Browse files- app/routes.py +3 -3
app/routes.py
CHANGED
@@ -12,7 +12,7 @@ configure_logging()
|
|
12 |
storage_map = {}
|
13 |
|
14 |
|
15 |
-
@app.route("/v1/chat/completions", methods=["GET", "POST", "OPTIONS"])
|
16 |
def onRequest():
|
17 |
try:
|
18 |
return fetch(request)
|
@@ -21,7 +21,7 @@ def onRequest():
|
|
21 |
return handle_error(e)
|
22 |
|
23 |
|
24 |
-
@app.route('/v1/models')
|
25 |
def list_models():
|
26 |
return {
|
27 |
"object": "list",
|
@@ -34,7 +34,7 @@ def list_models():
|
|
34 |
}
|
35 |
|
36 |
|
37 |
-
@app.route('/v1/images/generations', methods= ["post"])
|
38 |
def image():
|
39 |
try:
|
40 |
request.get_json()["model"] = IMAGE_MODEL_NAMES[0]
|
|
|
12 |
storage_map = {}
|
13 |
|
14 |
|
15 |
+
@app.route("/hf/v1/chat/completions", methods=["GET", "POST", "OPTIONS"])
|
16 |
def onRequest():
|
17 |
try:
|
18 |
return fetch(request)
|
|
|
21 |
return handle_error(e)
|
22 |
|
23 |
|
24 |
+
@app.route('/hf/v1/models')
|
25 |
def list_models():
|
26 |
return {
|
27 |
"object": "list",
|
|
|
34 |
}
|
35 |
|
36 |
|
37 |
+
@app.route('/hf/v1/images/generations', methods= ["post"])
|
38 |
def image():
|
39 |
try:
|
40 |
request.get_json()["model"] = IMAGE_MODEL_NAMES[0]
|