Merge pull request #1340 from joequant/main

allow version to work with -rc tag
This commit is contained in:
Timothy Jaeryang Baek 2024-04-06 18:57:41 -07:00 committed by GitHub
commit 782cce7c44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -215,7 +215,8 @@ async def get_ollama_versions(url_idx: Optional[int] = None):
if len(responses) > 0:
lowest_version = min(
responses, key=lambda x: tuple(map(int, x["version"].split(".")))
responses,
key=lambda x: tuple(map(int, x["version"].split("-")[0].split("."))),
)
return {"version": lowest_version["version"]}