8000 additional work for getAllText, etc · ag-python-qt/pyqt-openai@6092f8f · GitHub
[go: up one dir, main page]

Skip to content

Commit 6092f8f

Browse files
committed
additional work for getAllText, etc
1 parent 4021ac7 commit 6092f8f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pyqt_openai/chat_widget/chatBrowser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ def getAllText(self):
104104
if lay.itemAt(i) and lay.itemAt(i).widget():
105105
widget = lay.itemAt(i).widget()
106106
if isinstance(widget, AIChatUnit):
107-
all_text_lst.append(widget.text())
107+
all_text_lst.append(f'Answer: {widget.text()}')
108+
elif isinstance(widget, UserChatUnit):
109+
all_text_lst.append(f'Question: {widget.text()}')
108110

109111
return '\n'.join(all_text_lst)
110112

pyqt_openai/openAiChatBotWidget.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ def __continueResponse(self):
243243
self.__chat(True)
244244

245245
def __regenerateResponse(self):
246+
# TODO
246247
"""
247248
get last question and make it another response based on it
248249
"""
@@ -252,7 +253,8 @@ def __toggleWidgetWhileChatting(self, f, continue_f=False):
252253
self.__lineEdit.setEnabled(f)
253254
self.__leftSideBarWidget.setEnabled(f)
254255
self.__prompt.activateDuringGeneratingWidget(not f)
255-
self.__prompt.activateAfterResponseWidget(f, continue_f)
256+
# TODO
257+
# self.__prompt.activateAfterResponseWidget(f, continue_f)
256258

257259
def __beforeGenerated(self):
258260
self.__toggleWidgetWhileChatting(False)

0 commit comments

Comments
 (0)
0