8000 show response in NotifierWidget · ag-python-qt/pyqt-openai@75e0a9f · GitHub
[go: up one dir, main page]

Skip to content

Commit 75e0a9f

Browse files
committed
show response in NotifierWidget
1 parent e0d5a3a commit 75e0a9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyqt_openai/chat_widget/chatBrowser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def showLabel(self, text, user_f, stream_f, finish_reason=''):
5050
# change user_f type from bool to int to insert in db
5151
self.convUnitUpdated.emit(self.__cur_id, int(user_f), text, finish_reason)
5252

53-
def __getLastUnit(self) -> AIChatUnit:
53+
def __getLastUnit(self) -> AIChatUnit | None:
5454
item = self.getChatWidget().layout().itemAt(self.getChatWidget().layout().count() - 1)
5555
if item:
5656
return item.widget()

pyqt_openai/openAiChatBotWidget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def __afterGenerated(self):
244244
self.__toggleWidgetWhileChatting(True)
245245
self.__lineEdit.setFocus()
246246
if not self.isVisible():
247-
self.__notifierWidget = NotifierWidget(informative_text=LangClass.TRANSLATIONS['Response 👌'], detailed_text=LangClass.TRANSLATIONS['Click this!'])
247+
self.__notifierWidget = NotifierWidget(informative_text=LangClass.TRANSLATIONS['Response 👌'], detailed_text = self.__browser.getLastResponse())
248248
self.__notifierWidget.show()
249249
self.__notifierWidget.doubleClicked.connect(self.notifierWidgetActivated)
250250

0 commit comments

Comments
 (0)
0