Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
555e4e32
Commit
555e4e32
authored
May 26, 2024
by
Timothy J. Baek
Browse files
feat: allow insecure pull
parent
84bfebd0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
backend/apps/ollama/main.py
backend/apps/ollama/main.py
+4
-1
No files found.
backend/apps/ollama/main.py
View file @
555e4e32
...
...
@@ -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
,
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment