Quick fix with images handling

This commit is contained in:
jeffser 2024-06-04 18:45:50 -06:00
parent a4d26b2bda
commit 4ececd850b

View File

@ -497,6 +497,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
child=image_container
)
for image in images:
if os.path.exists(os.path.join(self.data_dir, "chats", self.chats['selected_chat'], id, image)):
image_data = base64.b64decode(self.get_content_of_file(os.path.join(self.data_dir, "chats", self.chats['selected_chat'], id, image), "image"))
loader = GdkPixbuf.PixbufLoader.new()
loader.write(image_data)
@ -1215,6 +1216,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
connection_handler.url = f"http://127.0.0.1:{local_instance.port}"
self.welcome_dialog.present(self)
if self.verify_connection() is False: self.connection_error()
print(connection_handler.url)
self.update_list_available_models()
self.load_history()
self.update_chat_list()