Clarify on-the-fly server names
All checks were successful
Build and Publish / build_and_publish (push) Successful in 45s
All checks were successful
Build and Publish / build_and_publish (push) Successful in 45s
This commit is contained in:
parent
954d01bca5
commit
af11baeeaa
1 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class ServerConfig(BaseModel):
|
class ServerConfig(BaseModel):
|
||||||
name: str = Field(min_length=1, max_length=32)
|
name: str = Field(min_length=1, max_length=4096)
|
||||||
base_url: AnyHttpUrl
|
base_url: AnyHttpUrl
|
||||||
gpu: bool = False
|
gpu: bool = False
|
||||||
vram_gb: int = 4
|
vram_gb: int = 4
|
||||||
|
@ -66,7 +66,7 @@ def get_server(name_or_base_url: str) -> ServerConfig | None:
|
||||||
else:
|
else:
|
||||||
if parsed.netloc and parsed.scheme in ["http", "https"]:
|
if parsed.netloc and parsed.scheme in ["http", "https"]:
|
||||||
defaults = {
|
defaults = {
|
||||||
"name": parsed.hostname,
|
"name": ":temporary:-:%s:" % parsed.hostname,
|
||||||
"base_url": "{0.scheme}://{0.netloc}".format(parsed),
|
"base_url": "{0.scheme}://{0.netloc}".format(parsed),
|
||||||
"gpu": False,
|
"gpu": False,
|
||||||
"vram_gb": 2,
|
"vram_gb": 2,
|
||||||
|
|
Loading…
Reference in a new issue