Update main.py
Browse files
main.py
CHANGED
@@ -12,7 +12,7 @@ import os
|
|
12 |
app = Flask(__name__)
|
13 |
app.json.sort_keys = False
|
14 |
|
15 |
-
parser = argparse.ArgumentParser(description="An example of
|
16 |
parser.add_argument("--host", type=str, help="Set the ip address.(default: 0.0.0.0)", default='0.0.0.0')
|
17 |
parser.add_argument("--port", type=int, help="Set the port.(default: 7860)", default=7860)
|
18 |
args = parser.parse_args()
|
@@ -28,7 +28,7 @@ def model_list():
|
|
28 |
"object": "list",
|
29 |
"data": [
|
30 |
{
|
31 |
-
"id": "
|
32 |
"object": "model",
|
33 |
"created": time_now,
|
34 |
"owned_by": "tastypear"
|
@@ -158,7 +158,7 @@ def gen_res_data(data, time_now=0, start=False):
|
|
158 |
"id": "chatcmpl",
|
159 |
"object": "chat.completion.chunk",
|
160 |
"created": time_now,
|
161 |
-
"model": "
|
162 |
"choices": [{"index": 0, "finish_reason": None}],
|
163 |
}
|
164 |
|
|
|
12 |
app = Flask(__name__)
|
13 |
app.json.sort_keys = False
|
14 |
|
15 |
+
parser = argparse.ArgumentParser(description="An example of Hunyuan demo with a similar API to OAI.")
|
16 |
parser.add_argument("--host", type=str, help="Set the ip address.(default: 0.0.0.0)", default='0.0.0.0')
|
17 |
parser.add_argument("--port", type=int, help="Set the port.(default: 7860)", default=7860)
|
18 |
args = parser.parse_args()
|
|
|
28 |
"object": "list",
|
29 |
"data": [
|
30 |
{
|
31 |
+
"id": "hunyuan-large",
|
32 |
"object": "model",
|
33 |
"created": time_now,
|
34 |
"owned_by": "tastypear"
|
|
|
158 |
"id": "chatcmpl",
|
159 |
"object": "chat.completion.chunk",
|
160 |
"created": time_now,
|
161 |
+
"model": "hunyuan-large",
|
162 |
"choices": [{"index": 0, "finish_reason": None}],
|
163 |
}
|
164 |
|