frontengine-dev 0.0.31__py3-none-any.whl → 0.0.33__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- frontengine/show/chat/chat_toast.py +1 -0
- frontengine/ui/chat/chatthread.py +4 -6
- frontengine/ui/setting/chat_scene/chat_scene_setting.py +15 -5
- frontengine/ui/setting/control_center/control_center_ui.py +2 -2
- {frontengine_dev-0.0.31.dist-info → frontengine_dev-0.0.33.dist-info}/METADATA +2 -2
- {frontengine_dev-0.0.31.dist-info → frontengine_dev-0.0.33.dist-info}/RECORD +9 -9
- {frontengine_dev-0.0.31.dist-info → frontengine_dev-0.0.33.dist-info}/LICENSE +0 -0
- {frontengine_dev-0.0.31.dist-info → frontengine_dev-0.0.33.dist-info}/WHEEL +0 -0
- {frontengine_dev-0.0.31.dist-info → frontengine_dev-0.0.33.dist-info}/top_level.txt +0 -0
@@ -4,7 +4,7 @@ from pathlib import Path
|
|
4
4
|
from queue import Queue
|
5
5
|
from threading import Thread
|
6
6
|
|
7
|
-
from
|
7
|
+
from re_edge_gpt import Chatbot, ConversationStyle
|
8
8
|
from PySide6.QtWidgets import QPlainTextEdit
|
9
9
|
|
10
10
|
|
@@ -29,11 +29,10 @@ class DelegateChat(object):
|
|
29
29
|
|
30
30
|
class ChatThread(Thread):
|
31
31
|
|
32
|
-
def __init__(self,
|
32
|
+
def __init__(self, chat_send_message: str, locale: str):
|
33
33
|
super().__init__()
|
34
34
|
self.current_message = None
|
35
35
|
self.chat_send_message = chat_send_message
|
36
|
-
self.message_panel = message_panel
|
37
36
|
self.locale = locale
|
38
37
|
if DELEGATE_CHAT.chat_bot is not None:
|
39
38
|
self.chat_bot = DELEGATE_CHAT.chat_bot
|
@@ -64,15 +63,14 @@ class ChatThread(Thread):
|
|
64
63
|
for text_dict in self.current_message.get("item").get("messages"):
|
65
64
|
if text_dict.get("author") == "bot":
|
66
65
|
response_text: str = text_dict.get("text")
|
67
|
-
self.message_panel.appendPlainText(response_text)
|
68
|
-
self.message_panel.appendPlainText("\n")
|
69
66
|
MESSAGE_QUEUE.put_nowait(response_text)
|
70
|
-
|
67
|
+
PANEL_MESSAGE_QUEUE.put_nowait(response_text)
|
71
68
|
except Exception as error:
|
72
69
|
EXCEPTION_QUEUE.put_nowait(repr(error))
|
73
70
|
raise error
|
74
71
|
|
75
72
|
|
76
73
|
MESSAGE_QUEUE = Queue()
|
74
|
+
PANEL_MESSAGE_QUEUE = Queue()
|
77
75
|
DELEGATE_CHAT = DelegateChat()
|
78
76
|
EXCEPTION_QUEUE = Queue()
|
@@ -1,12 +1,13 @@
|
|
1
1
|
from typing import Dict, Callable
|
2
2
|
|
3
|
+
from PySide6.QtCore import QTimer
|
3
4
|
from PySide6.QtWidgets import QWidget, QGridLayout, QPushButton, QScrollArea, QComboBox, QLabel, \
|
4
5
|
QPlainTextEdit, QLineEdit, QBoxLayout
|
5
6
|
|
6
7
|
from frontengine.show.scene.scene import SceneManager
|
7
8
|
from frontengine.ui.chat.chat_model import load_scene_json, chat_model
|
8
9
|
from frontengine.ui.chat.chat_scene_input import ChatInputDialog
|
9
|
-
from frontengine.ui.chat.chatthread import ChatThread, DELEGATE_CHAT
|
10
|
+
from frontengine.ui.chat.chatthread import ChatThread, DELEGATE_CHAT, PANEL_MESSAGE_QUEUE
|
10
11
|
from frontengine.ui.chat.speech_to_text import ChatSpeechToText
|
11
12
|
from frontengine.utils.logging.loggin_instance import front_engine_logger
|
12
13
|
from frontengine.utils.multi_language.language_wrapper import language_wrapper
|
@@ -98,6 +99,17 @@ class ChatSceneUI(QWidget):
|
|
98
99
|
self.grid_layout.addWidget(self.start_button, 0, 9)
|
99
100
|
self.grid_layout.addWidget(self.chat_panel_scroll_area, 1, 0, -1, -1)
|
100
101
|
self.setLayout(self.grid_layout)
|
102
|
+
# update panel timer
|
103
|
+
self.update_panel_timer = QTimer()
|
104
|
+
self.update_panel_timer.setInterval(10)
|
105
|
+
self.update_panel_timer.timeout.connect(self.update_panel)
|
106
|
+
self.update_panel_timer.start()
|
107
|
+
|
108
|
+
def update_panel(self):
|
109
|
+
if not PANEL_MESSAGE_QUEUE.empty():
|
110
|
+
text = PANEL_MESSAGE_QUEUE.get_nowait()
|
111
|
+
self.chat_panel.appendPlainText(text)
|
112
|
+
self.chat_panel.appendPlainText("\n")
|
101
113
|
|
102
114
|
def start_chat(self) -> None:
|
103
115
|
self.chat_input = ChatInputDialog(
|
@@ -115,13 +127,11 @@ class ChatSceneUI(QWidget):
|
|
115
127
|
self.voice_input.send_text_button.clicked.connect(self.send_voice_chat)
|
116
128
|
|
117
129
|
def send_voice_chat(self):
|
118
|
-
chat_thread = ChatThread(
|
119
|
-
self.chat_panel, self.voice_input.voice_text_edit.text(), self.locale_input.text())
|
130
|
+
chat_thread = ChatThread(self.voice_input.voice_text_edit.text(), self.locale_input.text())
|
120
131
|
chat_thread.start()
|
121
132
|
|
122
133
|
def send_chat(self):
|
123
|
-
chat_thread = ChatThread(
|
124
|
-
self.chat_panel, self.chat_input.chat_input.toPlainText(), self.locale_input.text())
|
134
|
+
chat_thread = ChatThread(self.chat_input.chat_input.toPlainText(), self.locale_input.text())
|
125
135
|
chat_thread.start()
|
126
136
|
|
127
137
|
def change_style(self):
|
@@ -113,10 +113,10 @@ class ControlCenterUI(QWidget):
|
|
113
113
|
self.setLayout(self.grid_layout)
|
114
114
|
# Redirect
|
115
115
|
self.redirect_timer = QTimer(self)
|
116
|
-
self.redirect_timer.setInterval(
|
116
|
+
self.redirect_timer.setInterval(10)
|
117
117
|
self.redirect_timer.timeout.connect(self.redirect)
|
118
118
|
self.redirect_timer.start()
|
119
|
-
redirect_manager_instance.set_redirect(self, True)
|
119
|
+
# redirect_manager_instance.set_redirect(self, True)
|
120
120
|
|
121
121
|
def clear_video(self) -> None:
|
122
122
|
front_engine_logger.info("clear_video")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: frontengine-dev
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.33
|
4
4
|
Summary: FrontEngine is BingGPT that can use-define front end or only use like screen saver
|
5
5
|
Author-email: JE-Chen <jechenmailman@gmail.com>
|
6
6
|
License: MIT
|
@@ -18,7 +18,7 @@ Description-Content-Type: text/markdown
|
|
18
18
|
License-File: LICENSE
|
19
19
|
Requires-Dist: PySide6
|
20
20
|
Requires-Dist: qt-material
|
21
|
-
Requires-Dist:
|
21
|
+
Requires-Dist: re-edge-gpt
|
22
22
|
Requires-Dist: pyttsx3
|
23
23
|
Requires-Dist: SpeechRecognition
|
24
24
|
Requires-Dist: PyAudio
|
@@ -1,7 +1,7 @@
|
|
1
1
|
frontengine/__init__.py,sha256=qF008fW3gVtgmSoyCRByxFII3kAEpHdxyARCAoEIJg0,1988
|
2
2
|
frontengine/show/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
frontengine/show/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
frontengine/show/chat/chat_toast.py,sha256=
|
4
|
+
frontengine/show/chat/chat_toast.py,sha256=rbgRoyHkP-lnPY1DTF8YiXwgPZOYkSF8A5ShLl2PfKQ,1911
|
5
5
|
frontengine/show/gif/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
frontengine/show/gif/paint_gif.py,sha256=gkzPRbxLVQt2YzwnUwZ_aT6x4TabWOEvHrc7fh6NumE,2788
|
7
7
|
frontengine/show/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -25,7 +25,7 @@ frontengine/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
frontengine/ui/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
26
|
frontengine/ui/chat/chat_model.py,sha256=qmd1yh3q1Kv9GQHYD9YCVBLO-vI66t7OGVUxJnwSpg4,2775
|
27
27
|
frontengine/ui/chat/chat_scene_input.py,sha256=j6Dt3GRsLtmmbK-XASLAU8rJsuPlm_Mn5TWkKLlB3WM,2483
|
28
|
-
frontengine/ui/chat/chatthread.py,sha256
|
28
|
+
frontengine/ui/chat/chatthread.py,sha256=-4grvH9I-ab7cufZR1NhJZYLDfJzI33Toyaw5QbG0uM,2762
|
29
29
|
frontengine/ui/chat/speech_to_text.py,sha256=PzNDtYw6Ju5JqBeRIKICHVtlYq2hwpUTTF8jvHTjOPw,2548
|
30
30
|
frontengine/ui/color/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
31
|
frontengine/ui/color/global_color.py,sha256=Rh-R-X2BHVjcK5MTBZ1nEMVHgLj1rP4nk-wTQKbiwFA,125
|
@@ -37,9 +37,9 @@ frontengine/ui/main/language_menu.py,sha256=hY4W5pKeJTff_9JEfS0aSUh7Bi5zArLvSrhg
|
|
37
37
|
frontengine/ui/main/main_ui.py,sha256=AkCaMPvZUEcVbfG-xixUkqgHNq6fr7MO6WKtHv2mz_I,6367
|
38
38
|
frontengine/ui/setting/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
39
|
frontengine/ui/setting/chat_scene/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
|
-
frontengine/ui/setting/chat_scene/chat_scene_setting.py,sha256=
|
40
|
+
frontengine/ui/setting/chat_scene/chat_scene_setting.py,sha256=NkEnwswNpxv_Q0iiteas7m8Tx0QRaCVp7bGHzvUx9ZQ,8060
|
41
41
|
frontengine/ui/setting/control_center/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
42
|
-
frontengine/ui/setting/control_center/control_center_ui.py,sha256=
|
42
|
+
frontengine/ui/setting/control_center/control_center_ui.py,sha256=5lQ1Fk14keVBZYDdX3vo_SjK8l5ohNLJLLCCSTN-3mI,8321
|
43
43
|
frontengine/ui/setting/gif/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
44
|
frontengine/ui/setting/gif/gif_setting_ui.py,sha256=X7LsOgTEZPRJOSHaIvd-LTxoOZOFTIBfYL8owYBQlZU,6038
|
45
45
|
frontengine/ui/setting/image/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -99,8 +99,8 @@ frontengine/utils/multi_language/language_wrapper.py,sha256=KBqsG6ng5LSJkGqmu_YD
|
|
99
99
|
frontengine/utils/multi_language/traditional_chinese.py,sha256=Oeabbu7iFNz5WNt_2P0-qc9DtYP3Ccska6MrclOSMYI,4982
|
100
100
|
frontengine/utils/redirect_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
101
101
|
frontengine/utils/redirect_manager/redirect_manager_class.py,sha256=zGJeVpjRU12MCnhVAdksAIhK_IhddI4cNKVb7DMgOZA,1888
|
102
|
-
frontengine_dev-0.0.
|
103
|
-
frontengine_dev-0.0.
|
104
|
-
frontengine_dev-0.0.
|
105
|
-
frontengine_dev-0.0.
|
106
|
-
frontengine_dev-0.0.
|
102
|
+
frontengine_dev-0.0.33.dist-info/LICENSE,sha256=b3VlPBXnrDylKGffOEOLWMgOX-yfd65XC7PA1_sox2o,1085
|
103
|
+
frontengine_dev-0.0.33.dist-info/METADATA,sha256=jvta1Olpvy3G4I5R95a86LtVJ8szNXLratNlLE6pixw,3546
|
104
|
+
frontengine_dev-0.0.33.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
105
|
+
frontengine_dev-0.0.33.dist-info/top_level.txt,sha256=btCybScN_ubeQ8phsSDBB0T-HyHjqt7b-WPy61uTox0,12
|
106
|
+
frontengine_dev-0.0.33.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|