Skip to content

Commit 7f3fb0d

Browse files
committed
Tweaks to chat title generation
1 parent d56c132 commit 7f3fb0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def generate_chat_title(self, message, label_element):
580580
if 'images' in message: data["images"] = message['images']
581581
response = connection_handler.simple_post(f"{connection_handler.url}/api/generate", data=json.dumps(data))
582582

583-
new_chat_name = json.loads(response.text)["response"].strip().removeprefix("Title: ").removeprefix("title: ").strip('\'"').title()
583+
new_chat_name = json.loads(response.text)["response"].strip().removeprefix("Title: ").removeprefix("title: ").strip('\'"').replace('\n', '').title()
584584
new_chat_name = new_chat_name[:50] + (new_chat_name[50:] and '...')
585585
self.rename_chat(label_element.get_name(), new_chat_name, label_element)
586586

0 commit comments

Comments
 (0)