mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
feat: allow insecure pull
This commit is contained in:
@@ -306,6 +306,9 @@ async def pull_model(
|
|||||||
|
|
||||||
r = None
|
r = None
|
||||||
|
|
||||||
|
# Admin should be able to pull models from any source
|
||||||
|
payload = {**form_data.model_dump(exclude_none=True), "insecure": True}
|
||||||
|
|
||||||
def get_request():
|
def get_request():
|
||||||
nonlocal url
|
nonlocal url
|
||||||
nonlocal r
|
nonlocal r
|
||||||
@@ -333,7 +336,7 @@ async def pull_model(
|
|||||||
r = requests.request(
|
r = requests.request(
|
||||||
method="POST",
|
method="POST",
|
||||||
url=f"{url}/api/pull",
|
url=f"{url}/api/pull",
|
||||||
data=form_data.model_dump_json(exclude_none=True).encode(),
|
data=json.dumps(payload),
|
||||||
stream=True,
|
stream=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user