From af11baeeaaf032d2dcedcaa6cd6f6fe791e16f38 Mon Sep 17 00:00:00 2001 From: nexy7574 Date: Tue, 11 Jun 2024 01:15:25 +0100 Subject: [PATCH] Clarify on-the-fly server names --- jimmy/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jimmy/config.py b/jimmy/config.py index 12ca67e..b09d829 100644 --- a/jimmy/config.py +++ b/jimmy/config.py @@ -11,7 +11,7 @@ log = logging.getLogger(__name__) class ServerConfig(BaseModel): - name: str = Field(min_length=1, max_length=32) + name: str = Field(min_length=1, max_length=4096) base_url: AnyHttpUrl gpu: bool = False vram_gb: int = 4 @@ -66,7 +66,7 @@ def get_server(name_or_base_url: str) -> ServerConfig | None: else: if parsed.netloc and parsed.scheme in ["http", "https"]: defaults = { - "name": parsed.hostname, + "name": ":temporary:-:%s:" % parsed.hostname, "base_url": "{0.scheme}://{0.netloc}".format(parsed), "gpu": False, "vram_gb": 2,