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
0470146d
Commit
0470146d
authored
Aug 14, 2024
by
Michael Poluektov
Browse files
replace Tuple with tuple
parent
a518d504
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
backend/apps/ollama/main.py
backend/apps/ollama/main.py
+1
-1
backend/utils/misc.py
backend/utils/misc.py
+2
-2
backend/utils/tools.py
backend/utils/tools.py
+1
-1
No files found.
backend/apps/ollama/main.py
View file @
0470146d
...
...
@@ -21,7 +21,7 @@ import asyncio
import
logging
import
time
from
urllib.parse
import
urlparse
from
typing
import
Optional
,
List
,
Union
from
typing
import
Optional
,
Union
from
starlette.background
import
BackgroundTask
...
...
backend/utils/misc.py
View file @
0470146d
...
...
@@ -2,7 +2,7 @@ from pathlib import Path
import
hashlib
import
re
from
datetime
import
timedelta
from
typing
import
Optional
,
List
,
Tuple
,
Callable
from
typing
import
Optional
,
Callable
import
uuid
import
time
...
...
@@ -52,7 +52,7 @@ def remove_system_message(messages: list[dict]) -> list[dict]:
return
[
message
for
message
in
messages
if
message
[
"role"
]
!=
"system"
]
def
pop_system_message
(
messages
:
list
[
dict
])
->
T
uple
[
Optional
[
dict
],
list
[
dict
]]:
def
pop_system_message
(
messages
:
list
[
dict
])
->
t
uple
[
Optional
[
dict
],
list
[
dict
]]:
return
get_system_message
(
messages
),
remove_system_message
(
messages
)
...
...
backend/utils/tools.py
View file @
0470146d
import
inspect
from
typing
import
get_type_hints
,
List
,
Dict
,
Any
from
typing
import
get_type_hints
def
doc_to_dict
(
docstring
):
...
...
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