Spaces:
Paused
Paused
Update main.py
Browse files
main.py
CHANGED
|
@@ -27,7 +27,7 @@ def model_list():
|
|
| 27 |
"object": "list",
|
| 28 |
"data": [
|
| 29 |
{
|
| 30 |
-
"id": "
|
| 31 |
"object": "model",
|
| 32 |
"created": time_now,
|
| 33 |
"owned_by": "tastypear"
|
|
@@ -44,7 +44,7 @@ def model_list():
|
|
| 44 |
|
| 45 |
@app.route("/", methods=["GET"])
|
| 46 |
def index():
|
| 47 |
-
return Response(f'
|
| 48 |
f'Set "{os.getenv("SPACE_URL")}/api" as proxy (or API Domain) in your Chatbot.<br><br>'+
|
| 49 |
f'The complete API is: {os.getenv("SPACE_URL")}/api/v1/chat/completions')
|
| 50 |
|
|
@@ -136,7 +136,7 @@ def gen_res_data(data, time_now=0, start=False):
|
|
| 136 |
"id": "chatcmpl",
|
| 137 |
"object": "chat.completion.chunk",
|
| 138 |
"created": time_now,
|
| 139 |
-
"model": "
|
| 140 |
"choices": [{"index": 0, "finish_reason": None}],
|
| 141 |
}
|
| 142 |
|
|
|
|
| 27 |
"object": "list",
|
| 28 |
"data": [
|
| 29 |
{
|
| 30 |
+
"id": "glm-4",
|
| 31 |
"object": "model",
|
| 32 |
"created": time_now,
|
| 33 |
"owned_by": "tastypear"
|
|
|
|
| 44 |
|
| 45 |
@app.route("/", methods=["GET"])
|
| 46 |
def index():
|
| 47 |
+
return Response(f'ZhipuAI GLM-4 OpenAI Compatible API<br><br>'+
|
| 48 |
f'Set "{os.getenv("SPACE_URL")}/api" as proxy (or API Domain) in your Chatbot.<br><br>'+
|
| 49 |
f'The complete API is: {os.getenv("SPACE_URL")}/api/v1/chat/completions')
|
| 50 |
|
|
|
|
| 136 |
"id": "chatcmpl",
|
| 137 |
"object": "chat.completion.chunk",
|
| 138 |
"created": time_now,
|
| 139 |
+
"model": "glm-4",
|
| 140 |
"choices": [{"index": 0, "finish_reason": None}],
|
| 141 |
}
|
| 142 |
|