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
92cc87d9
Commit
92cc87d9
authored
Mar 22, 2024
by
Timothy J. Baek
Browse files
fix: ollama upload url
parent
9e37d6ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
backend/apps/ollama/main.py
backend/apps/ollama/main.py
+1
-1
No files found.
backend/apps/ollama/main.py
View file @
92cc87d9
...
@@ -1060,7 +1060,7 @@ def upload_model(file: UploadFile = File(...), url_idx: Optional[int] = None):
...
@@ -1060,7 +1060,7 @@ def upload_model(file: UploadFile = File(...), url_idx: Optional[int] = None):
hashed
=
calculate_sha256
(
f
)
hashed
=
calculate_sha256
(
f
)
f
.
seek
(
0
)
f
.
seek
(
0
)
url
=
f
"
{
ollama_url
}
/blobs/sha256:
{
hashed
}
"
url
=
f
"
{
ollama_url
}
/
api/
blobs/sha256:
{
hashed
}
"
response
=
requests
.
post
(
url
,
data
=
f
)
response
=
requests
.
post
(
url
,
data
=
f
)
if
response
.
ok
:
if
response
.
ok
:
...
...
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