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
124020f8
Commit
124020f8
authored
Mar 05, 2024
by
Timothy J. Baek
Browse files
chore: added print url for debugging
parent
fbdac832
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
backend/apps/ollama/main.py
backend/apps/ollama/main.py
+9
-0
No files found.
backend/apps/ollama/main.py
View file @
124020f8
...
@@ -279,6 +279,7 @@ async def push_model(
...
@@ -279,6 +279,7 @@ async def push_model(
)
)
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
print
(
url
)
r
=
None
r
=
None
...
@@ -340,6 +341,8 @@ async def create_model(
...
@@ -340,6 +341,8 @@ async def create_model(
):
):
print
(
form_data
)
print
(
form_data
)
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
print
(
url
)
r
=
None
r
=
None
def
get_request
():
def
get_request
():
...
@@ -411,6 +414,7 @@ async def copy_model(
...
@@ -411,6 +414,7 @@ async def copy_model(
)
)
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
print
(
url
)
try
:
try
:
r
=
requests
.
request
(
r
=
requests
.
request
(
...
@@ -497,6 +501,7 @@ async def show_model_info(form_data: ModelNameForm, user=Depends(get_current_use
...
@@ -497,6 +501,7 @@ async def show_model_info(form_data: ModelNameForm, user=Depends(get_current_use
url_idx
=
random
.
choice
(
app
.
state
.
MODELS
[
form_data
.
name
][
"urls"
])
url_idx
=
random
.
choice
(
app
.
state
.
MODELS
[
form_data
.
name
][
"urls"
])
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
print
(
url
)
try
:
try
:
r
=
requests
.
request
(
r
=
requests
.
request
(
...
@@ -548,6 +553,7 @@ async def generate_embeddings(
...
@@ -548,6 +553,7 @@ async def generate_embeddings(
)
)
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
print
(
url
)
try
:
try
:
r
=
requests
.
request
(
r
=
requests
.
request
(
...
@@ -607,6 +613,7 @@ async def generate_completion(
...
@@ -607,6 +613,7 @@ async def generate_completion(
)
)
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
print
(
url
)
r
=
None
r
=
None
...
@@ -704,6 +711,7 @@ async def generate_chat_completion(
...
@@ -704,6 +711,7 @@ async def generate_chat_completion(
)
)
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
print
(
url
)
r
=
None
r
=
None
...
@@ -802,6 +810,7 @@ async def generate_openai_chat_completion(
...
@@ -802,6 +810,7 @@ async def generate_openai_chat_completion(
)
)
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
url
=
app
.
state
.
OLLAMA_BASE_URLS
[
url_idx
]
print
(
url
)
r
=
None
r
=
None
...
...
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