From a02871dd28fe063030e2d507c35af1d2374b4538 Mon Sep 17 00:00:00 2001 From: jeffser Date: Fri, 2 Aug 2024 20:50:04 -0600 Subject: [PATCH] 'S fixed again :3 --- src/window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.py b/src/window.py index 6f0ebdc..0ad5a82 100644 --- a/src/window.py +++ b/src/window.py @@ -577,7 +577,7 @@ Generate a title following these rules: if 'images' in message: data["images"] = message['images'] response = connection_handler.simple_post(f"{connection_handler.url}/api/generate", data=json.dumps(data)) - new_chat_name = json.loads(response.text)["response"].strip().removeprefix("Title: ").removeprefix("title: ").strip('\'"').replace('\n', ' ').replace('\'S', '\'s').title() + new_chat_name = json.loads(response.text)["response"].strip().removeprefix("Title: ").removeprefix("title: ").strip('\'"').replace('\n', ' ').title().replace('\'S', '\'s) new_chat_name = new_chat_name[:50] + (new_chat_name[50:] and '...') self.rename_chat(label_element.get_name(), new_chat_name, label_element)