forked from open-webui/open-webui
		
	Merge pull request #1340 from joequant/main
allow version to work with -rc tag
This commit is contained in:
		
						commit
						782cce7c44
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -215,7 +215,8 @@ async def get_ollama_versions(url_idx: Optional[int] = None): | ||||||
| 
 | 
 | ||||||
|         if len(responses) > 0: |         if len(responses) > 0: | ||||||
|             lowest_version = min( |             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"]} |             return {"version": lowest_version["version"]} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Timothy Jaeryang Baek
						Timothy Jaeryang Baek