feat: allow insecure pull

This commit is contained in:
Timothy J. Baek 2024-05-26 01:31:17 -07:00
parent 84bfebd05e
commit 555e4e32d5
1 changed files with 4 additions and 1 deletions

View File

@ -306,6 +306,9 @@ async def pull_model(
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():
nonlocal url
nonlocal r
@ -333,7 +336,7 @@ async def pull_model(
r = requests.request(
method="POST",
url=f"{url}/api/pull",
data=form_data.model_dump_json(exclude_none=True).encode(),
data=json.dumps(payload),
stream=True,
)