mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-04-16 06:56:33 +00:00
new server
This commit is contained in:
parent
b8ed3581da
commit
7363a4bfdc
@ -104,7 +104,7 @@ class Service:
|
||||
if not self.wait_for_service(1,False) and base_url is None:
|
||||
ASCIIColors.info("Loading vllm service")
|
||||
|
||||
host, port = url2host_port(base_url)
|
||||
_, host, port = url2host_port(base_url)
|
||||
# run vllm
|
||||
if platform.system() == 'Windows':
|
||||
#subprocess.Popen(['wsl', 'ls', '$HOME'])
|
||||
|
@ -132,13 +132,14 @@ def url2host_port(url, default_port =8000):
|
||||
if "http" in url:
|
||||
parts = url.split(":")
|
||||
host = ":".join(parts[:2])
|
||||
host_no_http = parts[1].replace("//","")
|
||||
port = url.split(":")[2] if len(parts)==3 else default_port
|
||||
return host, port
|
||||
return host, host_no_http, port
|
||||
else:
|
||||
parts = url.split(":")
|
||||
host = parts[0]
|
||||
port = url.split(":")[1] if len(parts)==2 else default_port
|
||||
return host, port
|
||||
return host, host, port
|
||||
|
||||
def is_asyncio_loop_running():
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user