update format of api_allinone.py and llm_api_launch.py
This commit is contained in:
parent
b9fa84635d
commit
8396b57101
|
|
@ -11,6 +11,7 @@ python server/api_allinone.py --model-path-address model@host@port --num-gpus 2
|
|||
"""
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.append(os.path.dirname(__file__))
|
||||
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
|
||||
|
||||
|
|
@ -23,9 +24,9 @@ parser.add_argument("--api-port", type=int, default=7861)
|
|||
parser.add_argument("--ssl_keyfile", type=str)
|
||||
parser.add_argument("--ssl_certfile", type=str)
|
||||
|
||||
|
||||
api_args = ["api-host", "api-port", "ssl_keyfile", "ssl_certfile"]
|
||||
|
||||
|
||||
def run_api(host, port, **kwargs):
|
||||
app = create_app()
|
||||
if kwargs.get("ssl_keyfile") and kwargs.get("ssl_certfile"):
|
||||
|
|
@ -38,6 +39,7 @@ def run_api(host, port, **kwargs):
|
|||
else:
|
||||
uvicorn.run(app, host=host, port=port)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("Luanching api_allinone,it would take a while, please be patient...")
|
||||
print("正在启动api_allinone,LLM服务启动约3-10分钟,请耐心等待...")
|
||||
|
|
|
|||
|
|
@ -159,8 +159,6 @@ server_args = ["server-host", "server-port", "allow-credentials", "api-keys",
|
|||
"controller-address"
|
||||
]
|
||||
|
||||
|
||||
|
||||
# 0,controller, model_worker, openai_api_server
|
||||
# 1, 命令行选项
|
||||
# 2,LOG_PATH
|
||||
|
|
@ -244,6 +242,7 @@ def launch_all(args,
|
|||
print("Launching LLM service done!")
|
||||
print("LLM服务启动完毕。")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
args = parser.parse_args()
|
||||
# 必须要加http//:,否则InvalidSchema: No connection adapters were found
|
||||
|
|
|
|||
Loading…
Reference in New Issue