Packages: Fix exllamav2 version check

Post versions are ok to use for checking if the user is on the correct
exllamav2 wheel.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2024-02-10 14:00:26 -05:00
parent 8d8cf5dc69
commit 9f1d891490

View File

@@ -9,10 +9,10 @@ logger = init_logger(__name__)
def check_exllama_version():
"""Verifies the exllama version"""
required_version = "0.0.13"
current_version = package_version("exllamav2").split("+")[0]
required_version = version.parse("0.0.13.post1")
current_version = version.parse(package_version("exllamav2").split("+")[0])
if version.parse(current_version) < version.parse(required_version):
if current_version < required_version:
raise SystemExit(
f"ERROR: TabbyAPI requires ExLlamaV2 {required_version} "
f"or greater. Your current version is {current_version}.\n"