From bee9eea3aea3f11043043a354a32afd86462e722 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 20 Dec 2023 19:32:17 +0900 Subject: [PATCH] chat: file fixups --- .../assistant_setup/assistant_file_checker.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/MAVProxy/modules/mavproxy_chat/assistant_setup/assistant_file_checker.py b/MAVProxy/modules/mavproxy_chat/assistant_setup/assistant_file_checker.py index 49de7c280f..e684ddd250 100644 --- a/MAVProxy/modules/mavproxy_chat/assistant_setup/assistant_file_checker.py +++ b/MAVProxy/modules/mavproxy_chat/assistant_setup/assistant_file_checker.py @@ -69,10 +69,13 @@ def main(openai_api_key=None, delete_unused=False): # display the list of files which are not used by any Assistants print_unused_files_header = True for existing_file in existing_files: - if print_unused_files_header: - print("Files not used by any Assistants:") - print_unused_files_header = False if not existing_file.id in file_assistant_count.keys(): + # print header if this is the first unused file + if print_unused_files_header: + print("Files not used by any Assistants:") + print_unused_files_header = False + + # print file attributes filename_size_date = get_filename_size_date_from_id(existing_files, existing_file.id) print(" id:" + existing_file.id + " name:" + filename_size_date[0] + " size:" + str(filename_size_date[1]) + " date:" + filename_size_date[2])