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
edff071c
Commit
edff071c
authored
Jul 24, 2024
by
Timothy J. Baek
Browse files
refac
parent
3b487cfa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
12 deletions
+10
-12
backend/apps/webui/models/chats.py
backend/apps/webui/models/chats.py
+10
-12
No files found.
backend/apps/webui/models/chats.py
View file @
edff071c
...
...
@@ -265,19 +265,17 @@ class ChatTable:
).
all
()
)
# result has to be destrctured from sqlalchemy `row` and mapped to a dict since the `ChatModel`is not the returned dataclass.
return
list
(
map
(
lambda
row
:
ChatTitleIdResponse
.
model_validate
(
return
[
ChatTitleIdResponse
.
model_validate
(
{
"id"
:
row
[
0
],
"title"
:
row
[
1
],
"updated_at"
:
row
[
2
],
"created_at"
:
row
[
3
],
"id"
:
chat
[
0
],
"title"
:
chat
[
1
],
"updated_at"
:
chat
[
2
],
"created_at"
:
chat
[
3
],
}
),
all_chats
,
)
)
for
chat
in
all_chats
]
def
get_chat_list_by_chat_ids
(
self
,
chat_ids
:
List
[
str
],
skip
:
int
=
0
,
limit
:
int
=
50
...
...
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