Update ui.py

# Sort the uploaded files alphabetically
This commit is contained in:
slale-91 2024-08-05 08:25:05 +02:00 committed by GitHub
parent 6674b46fea
commit e2847daf4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -289,7 +289,8 @@ class PrivateGptUi:
"file_name", "[FILE NAME MISSING]"
)
files.add(file_name)
return [[row] for row in files]
sorted_files = sorted(files) # Sort the files alphabetically
return [[row] for row in sorted_files] # Use sorted files
def _upload_file(self, files: list[str]) -> None:
logger.debug("Loading count=%s files", len(files))