mirror of
https://github.com/open-webui/open-webui.git
synced 2026-01-03 23:25:21 +00:00
init (#20212)
This commit is contained in:
parent
fe3047d53c
commit
c02451178c
2 changed files with 3 additions and 5 deletions
|
|
@ -1647,7 +1647,7 @@ async def chat_completion(
|
||||||
)
|
)
|
||||||
|
|
||||||
# Insert chat files from parent message if any
|
# Insert chat files from parent message if any
|
||||||
parent_message = metadata.get("parent_message", {})
|
parent_message = metadata.get("parent_message") or {}
|
||||||
parent_message_files = parent_message.get("files", [])
|
parent_message_files = parent_message.get("files", [])
|
||||||
if parent_message_files:
|
if parent_message_files:
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
|
|
@ -682,10 +682,8 @@ async def get_user_pinned_chats(
|
||||||
async def get_user_chats(
|
async def get_user_chats(
|
||||||
user=Depends(get_verified_user), db: Session = Depends(get_session)
|
user=Depends(get_verified_user), db: Session = Depends(get_session)
|
||||||
):
|
):
|
||||||
return [
|
result = Chats.get_chats_by_user_id(user.id, db=db)
|
||||||
ChatResponse(**chat.model_dump())
|
return [ChatResponse(**chat.model_dump()) for chat in result.items]
|
||||||
for chat in Chats.get_chats_by_user_id(user.id, db=db)
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
############################
|
############################
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue