Explorar el Código

fix: ollama url model download issue

Timothy Jaeryang Baek hace 2 meses
padre
commit
7baca2b483
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      backend/open_webui/routers/ollama.py

+ 2 - 1
backend/open_webui/routers/ollama.py

@@ -1503,7 +1503,8 @@ async def download_file_stream(
 
                 if done:
                     file.seek(0)
-                    hashed = calculate_sha256(file)
+                    chunk_size = 1024 * 1024 * 2
+                    hashed = calculate_sha256(file, chunk_size)
                     file.seek(0)
 
                     url = f"{ollama_url}/api/blobs/sha256:{hashed}"