pygpt-net 2.6.20__py3-none-any.whl → 2.6.22__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.
Files changed (221) hide show
  1. pygpt_net/CHANGELOG.txt +13 -0
  2. pygpt_net/__init__.py +3 -3
  3. pygpt_net/app.py +3 -1
  4. pygpt_net/controller/__init__.py +4 -8
  5. pygpt_net/controller/access/voice.py +2 -2
  6. pygpt_net/controller/agent/agent.py +130 -2
  7. pygpt_net/controller/agent/experts.py +93 -96
  8. pygpt_net/controller/agent/llama.py +2 -1
  9. pygpt_net/controller/assistant/assistant.py +18 -1
  10. pygpt_net/controller/assistant/batch.py +2 -3
  11. pygpt_net/controller/assistant/editor.py +2 -2
  12. pygpt_net/controller/assistant/files.py +2 -3
  13. pygpt_net/controller/assistant/store.py +2 -2
  14. pygpt_net/controller/attachment/attachment.py +17 -1
  15. pygpt_net/controller/audio/audio.py +2 -2
  16. pygpt_net/controller/camera/camera.py +15 -7
  17. pygpt_net/controller/chat/chat.py +2 -2
  18. pygpt_net/controller/chat/common.py +50 -33
  19. pygpt_net/controller/chat/image.py +67 -77
  20. pygpt_net/controller/chat/input.py +94 -166
  21. pygpt_net/controller/chat/output.py +83 -140
  22. pygpt_net/controller/chat/response.py +83 -102
  23. pygpt_net/controller/chat/text.py +116 -149
  24. pygpt_net/controller/ctx/common.py +2 -1
  25. pygpt_net/controller/ctx/ctx.py +87 -6
  26. pygpt_net/controller/files/files.py +13 -1
  27. pygpt_net/controller/idx/idx.py +26 -2
  28. pygpt_net/controller/idx/indexer.py +85 -76
  29. pygpt_net/controller/kernel/reply.py +53 -66
  30. pygpt_net/controller/kernel/stack.py +16 -16
  31. pygpt_net/controller/lang/lang.py +52 -34
  32. pygpt_net/controller/model/importer.py +3 -2
  33. pygpt_net/controller/model/model.py +62 -3
  34. pygpt_net/controller/notepad/notepad.py +86 -84
  35. pygpt_net/controller/plugins/settings.py +3 -4
  36. pygpt_net/controller/settings/editor.py +4 -4
  37. pygpt_net/controller/settings/profile.py +105 -124
  38. pygpt_net/controller/theme/menu.py +154 -57
  39. pygpt_net/controller/theme/nodes.py +51 -44
  40. pygpt_net/controller/theme/theme.py +33 -9
  41. pygpt_net/controller/tools/tools.py +2 -2
  42. pygpt_net/controller/ui/tabs.py +2 -3
  43. pygpt_net/controller/ui/ui.py +16 -2
  44. pygpt_net/core/agents/observer/evaluation.py +3 -3
  45. pygpt_net/core/agents/provider.py +25 -3
  46. pygpt_net/core/agents/runner.py +4 -1
  47. pygpt_net/core/agents/runners/llama_workflow.py +19 -7
  48. pygpt_net/core/agents/runners/loop.py +3 -1
  49. pygpt_net/core/agents/runners/openai_workflow.py +17 -3
  50. pygpt_net/core/agents/tools.py +4 -1
  51. pygpt_net/core/bridge/context.py +34 -37
  52. pygpt_net/core/ctx/container.py +13 -12
  53. pygpt_net/core/ctx/ctx.py +1 -1
  54. pygpt_net/core/ctx/output.py +7 -4
  55. pygpt_net/core/db/database.py +2 -2
  56. pygpt_net/core/debug/console/console.py +2 -2
  57. pygpt_net/core/debug/debug.py +12 -1
  58. pygpt_net/core/dispatcher/dispatcher.py +24 -1
  59. pygpt_net/core/events/app.py +7 -7
  60. pygpt_net/core/events/control.py +26 -26
  61. pygpt_net/core/events/event.py +6 -3
  62. pygpt_net/core/events/kernel.py +2 -2
  63. pygpt_net/core/events/render.py +13 -13
  64. pygpt_net/core/experts/experts.py +76 -82
  65. pygpt_net/core/experts/worker.py +12 -12
  66. pygpt_net/core/filesystem/actions.py +1 -2
  67. pygpt_net/core/models/models.py +5 -1
  68. pygpt_net/core/models/ollama.py +14 -5
  69. pygpt_net/core/render/plain/helpers.py +2 -5
  70. pygpt_net/core/render/plain/renderer.py +26 -30
  71. pygpt_net/core/render/web/body.py +1 -1
  72. pygpt_net/core/render/web/helpers.py +2 -2
  73. pygpt_net/core/render/web/renderer.py +4 -4
  74. pygpt_net/core/settings/settings.py +43 -13
  75. pygpt_net/core/tabs/tabs.py +20 -13
  76. pygpt_net/core/types/__init__.py +2 -1
  77. pygpt_net/core/types/agent.py +4 -4
  78. pygpt_net/core/types/base.py +19 -0
  79. pygpt_net/core/types/console.py +6 -6
  80. pygpt_net/core/types/mode.py +8 -8
  81. pygpt_net/core/types/multimodal.py +3 -3
  82. pygpt_net/core/types/openai.py +2 -1
  83. pygpt_net/data/config/config.json +5 -5
  84. pygpt_net/data/config/models.json +19 -3
  85. pygpt_net/data/config/settings.json +14 -14
  86. pygpt_net/data/locale/locale.de.ini +4 -1
  87. pygpt_net/data/locale/locale.en.ini +6 -3
  88. pygpt_net/data/locale/locale.es.ini +4 -1
  89. pygpt_net/data/locale/locale.fr.ini +4 -1
  90. pygpt_net/data/locale/locale.it.ini +4 -1
  91. pygpt_net/data/locale/locale.pl.ini +5 -4
  92. pygpt_net/data/locale/locale.uk.ini +4 -1
  93. pygpt_net/data/locale/locale.zh.ini +4 -1
  94. pygpt_net/item/ctx.py +256 -240
  95. pygpt_net/item/model.py +59 -116
  96. pygpt_net/item/preset.py +122 -105
  97. pygpt_net/plugin/twitter/plugin.py +2 -2
  98. pygpt_net/provider/agents/llama_index/workflow/planner.py +3 -3
  99. pygpt_net/provider/agents/openai/agent.py +4 -12
  100. pygpt_net/provider/agents/openai/agent_b2b.py +10 -15
  101. pygpt_net/provider/agents/openai/agent_planner.py +4 -4
  102. pygpt_net/provider/agents/openai/agent_with_experts.py +3 -7
  103. pygpt_net/provider/agents/openai/agent_with_experts_feedback.py +4 -8
  104. pygpt_net/provider/agents/openai/agent_with_feedback.py +4 -8
  105. pygpt_net/provider/agents/openai/bot_researcher.py +2 -18
  106. pygpt_net/provider/agents/openai/bots/__init__.py +0 -0
  107. pygpt_net/provider/agents/openai/bots/research_bot/__init__.py +0 -0
  108. pygpt_net/provider/agents/openai/bots/research_bot/agents/__init__.py +0 -0
  109. pygpt_net/provider/agents/openai/bots/research_bot/agents/planner_agent.py +1 -1
  110. pygpt_net/provider/agents/openai/bots/research_bot/agents/search_agent.py +1 -0
  111. pygpt_net/provider/agents/openai/bots/research_bot/agents/writer_agent.py +1 -1
  112. pygpt_net/provider/agents/openai/bots/research_bot/manager.py +1 -10
  113. pygpt_net/provider/agents/openai/evolve.py +5 -9
  114. pygpt_net/provider/agents/openai/supervisor.py +4 -8
  115. pygpt_net/provider/core/config/patch.py +10 -3
  116. pygpt_net/provider/core/ctx/db_sqlite/utils.py +43 -43
  117. pygpt_net/provider/core/model/patch.py +11 -1
  118. pygpt_net/provider/core/preset/json_file.py +47 -49
  119. pygpt_net/provider/gpt/agents/experts.py +2 -2
  120. pygpt_net/tools/audio_transcriber/ui/dialogs.py +44 -54
  121. pygpt_net/tools/code_interpreter/body.py +1 -2
  122. pygpt_net/tools/code_interpreter/tool.py +7 -4
  123. pygpt_net/tools/code_interpreter/ui/html.py +1 -3
  124. pygpt_net/tools/code_interpreter/ui/widgets.py +2 -3
  125. pygpt_net/tools/html_canvas/ui/widgets.py +1 -3
  126. pygpt_net/tools/image_viewer/ui/dialogs.py +40 -37
  127. pygpt_net/tools/indexer/ui/widgets.py +2 -4
  128. pygpt_net/tools/media_player/tool.py +2 -5
  129. pygpt_net/tools/media_player/ui/widgets.py +60 -36
  130. pygpt_net/tools/text_editor/ui/widgets.py +18 -19
  131. pygpt_net/tools/translator/ui/widgets.py +39 -35
  132. pygpt_net/ui/base/context_menu.py +9 -4
  133. pygpt_net/ui/dialog/db.py +1 -3
  134. pygpt_net/ui/dialog/models.py +1 -3
  135. pygpt_net/ui/dialog/models_importer.py +2 -4
  136. pygpt_net/ui/dialogs.py +34 -30
  137. pygpt_net/ui/layout/chat/attachments.py +72 -84
  138. pygpt_net/ui/layout/chat/attachments_ctx.py +40 -44
  139. pygpt_net/ui/layout/chat/attachments_uploaded.py +36 -39
  140. pygpt_net/ui/layout/chat/calendar.py +100 -70
  141. pygpt_net/ui/layout/chat/chat.py +23 -17
  142. pygpt_net/ui/layout/chat/input.py +95 -118
  143. pygpt_net/ui/layout/chat/output.py +100 -162
  144. pygpt_net/ui/layout/chat/painter.py +89 -61
  145. pygpt_net/ui/layout/ctx/ctx_list.py +43 -52
  146. pygpt_net/ui/layout/status.py +23 -14
  147. pygpt_net/ui/layout/toolbox/agent.py +27 -38
  148. pygpt_net/ui/layout/toolbox/agent_llama.py +42 -45
  149. pygpt_net/ui/layout/toolbox/assistants.py +42 -38
  150. pygpt_net/ui/layout/toolbox/computer_env.py +32 -23
  151. pygpt_net/ui/layout/toolbox/footer.py +13 -16
  152. pygpt_net/ui/layout/toolbox/image.py +18 -21
  153. pygpt_net/ui/layout/toolbox/indexes.py +46 -89
  154. pygpt_net/ui/layout/toolbox/mode.py +20 -7
  155. pygpt_net/ui/layout/toolbox/model.py +12 -10
  156. pygpt_net/ui/layout/toolbox/presets.py +68 -52
  157. pygpt_net/ui/layout/toolbox/prompt.py +31 -58
  158. pygpt_net/ui/layout/toolbox/toolbox.py +25 -21
  159. pygpt_net/ui/layout/toolbox/vision.py +20 -22
  160. pygpt_net/ui/main.py +2 -4
  161. pygpt_net/ui/menu/about.py +64 -84
  162. pygpt_net/ui/menu/audio.py +87 -63
  163. pygpt_net/ui/menu/config.py +121 -127
  164. pygpt_net/ui/menu/debug.py +69 -76
  165. pygpt_net/ui/menu/file.py +32 -35
  166. pygpt_net/ui/menu/menu.py +2 -3
  167. pygpt_net/ui/menu/plugins.py +69 -33
  168. pygpt_net/ui/menu/theme.py +45 -46
  169. pygpt_net/ui/menu/tools.py +56 -60
  170. pygpt_net/ui/menu/video.py +20 -25
  171. pygpt_net/ui/tray.py +1 -2
  172. pygpt_net/ui/widget/audio/bar.py +1 -3
  173. pygpt_net/ui/widget/audio/input_button.py +3 -4
  174. pygpt_net/ui/widget/calendar/select.py +1 -2
  175. pygpt_net/ui/widget/dialog/base.py +12 -9
  176. pygpt_net/ui/widget/dialog/editor_file.py +20 -23
  177. pygpt_net/ui/widget/dialog/find.py +25 -24
  178. pygpt_net/ui/widget/dialog/profile.py +57 -53
  179. pygpt_net/ui/widget/draw/painter.py +62 -93
  180. pygpt_net/ui/widget/element/button.py +42 -30
  181. pygpt_net/ui/widget/element/checkbox.py +23 -15
  182. pygpt_net/ui/widget/element/group.py +6 -5
  183. pygpt_net/ui/widget/element/labels.py +1 -2
  184. pygpt_net/ui/widget/filesystem/explorer.py +93 -102
  185. pygpt_net/ui/widget/image/display.py +1 -2
  186. pygpt_net/ui/widget/lists/assistant.py +1 -2
  187. pygpt_net/ui/widget/lists/attachment.py +1 -2
  188. pygpt_net/ui/widget/lists/attachment_ctx.py +1 -2
  189. pygpt_net/ui/widget/lists/context.py +2 -4
  190. pygpt_net/ui/widget/lists/index.py +1 -2
  191. pygpt_net/ui/widget/lists/model.py +1 -2
  192. pygpt_net/ui/widget/lists/model_editor.py +1 -2
  193. pygpt_net/ui/widget/lists/model_importer.py +1 -2
  194. pygpt_net/ui/widget/lists/preset.py +1 -2
  195. pygpt_net/ui/widget/lists/preset_plugins.py +1 -2
  196. pygpt_net/ui/widget/lists/profile.py +1 -2
  197. pygpt_net/ui/widget/lists/uploaded.py +1 -2
  198. pygpt_net/ui/widget/option/checkbox.py +2 -4
  199. pygpt_net/ui/widget/option/checkbox_list.py +1 -4
  200. pygpt_net/ui/widget/option/cmd.py +1 -4
  201. pygpt_net/ui/widget/option/dictionary.py +25 -28
  202. pygpt_net/ui/widget/option/input.py +1 -3
  203. pygpt_net/ui/widget/tabs/Input.py +16 -12
  204. pygpt_net/ui/widget/tabs/body.py +5 -3
  205. pygpt_net/ui/widget/tabs/layout.py +36 -25
  206. pygpt_net/ui/widget/tabs/output.py +96 -74
  207. pygpt_net/ui/widget/textarea/calendar_note.py +1 -2
  208. pygpt_net/ui/widget/textarea/editor.py +41 -73
  209. pygpt_net/ui/widget/textarea/find.py +11 -10
  210. pygpt_net/ui/widget/textarea/html.py +3 -6
  211. pygpt_net/ui/widget/textarea/input.py +63 -64
  212. pygpt_net/ui/widget/textarea/notepad.py +54 -38
  213. pygpt_net/ui/widget/textarea/output.py +65 -54
  214. pygpt_net/ui/widget/textarea/search_input.py +5 -4
  215. pygpt_net/ui/widget/textarea/web.py +2 -4
  216. pygpt_net/ui/widget/vision/camera.py +2 -31
  217. {pygpt_net-2.6.20.dist-info → pygpt_net-2.6.22.dist-info}/METADATA +25 -154
  218. {pygpt_net-2.6.20.dist-info → pygpt_net-2.6.22.dist-info}/RECORD +218 -217
  219. {pygpt_net-2.6.20.dist-info → pygpt_net-2.6.22.dist-info}/LICENSE +0 -0
  220. {pygpt_net-2.6.20.dist-info → pygpt_net-2.6.22.dist-info}/WHEEL +0 -0
  221. {pygpt_net-2.6.20.dist-info → pygpt_net-2.6.22.dist-info}/entry_points.txt +0 -0
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2024.12.14 22:00:00 #
9
+ # Updated Date: 2025.08.24 23:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import copy
@@ -15,7 +15,10 @@ import os
15
15
  import shutil
16
16
  from typing import Optional, Dict, Any, List
17
17
 
18
+ from PySide6.QtWidgets import QApplication
19
+
18
20
  from pygpt_net.core.events import RenderEvent
21
+ from pygpt_net.utils import trans
19
22
 
20
23
 
21
24
  class Settings:
@@ -116,7 +119,7 @@ class Settings:
116
119
  """Load defaults from file"""
117
120
  file = self.window.ui.dialog['config.editor'].file
118
121
  self.load_editor(file)
119
- self.window.update_status("Restored from user file: {}".format(file))
122
+ self.window.update_status(f"Restored from user file: {file}")
120
123
 
121
124
  def load_default_editor_app(self):
122
125
  """Load defaults from file (app)"""
@@ -125,11 +128,11 @@ class Settings:
125
128
  if basename.endswith(".css"):
126
129
  path = str(os.path.join(self.window.core.config.get_app_path(), "data", "css", basename))
127
130
  self.load_editor(file, path)
128
- self.window.update_status("Restored from app defaults: {}".format(basename))
131
+ self.window.update_status(f"Restored from app defaults: {basename}")
129
132
  elif basename.endswith(".json"):
130
133
  path = str(os.path.join(self.window.core.config.get_app_path(), "data", "config", basename))
131
134
  self.load_editor(file, path)
132
- self.window.update_status("Restored from app defaults: {}".format(basename))
135
+ self.window.update_status(f"Restored from app defaults: {basename}")
133
136
 
134
137
  def load_editor(
135
138
  self,
@@ -151,13 +154,14 @@ class Settings:
151
154
  self.window.ui.paths['config'].setText(path)
152
155
 
153
156
  self.window.ui.dialog['config.editor'].file = file
157
+
154
158
  try:
155
159
  with open(path, 'r', encoding="utf-8") as f:
156
160
  txt = f.read()
157
161
  self.window.ui.editor['config'].setPlainText(txt)
158
162
  except Exception as e:
159
163
  self.window.core.debug.log(e)
160
- self.window.update_status("Error loading file: {}".format(e))
164
+ self.window.update_status(f"Error loading file: {e}")
161
165
 
162
166
  def save_editor(self):
163
167
  """Save file to disk"""
@@ -170,8 +174,8 @@ class Settings:
170
174
  try:
171
175
  json.loads(data)
172
176
  except Exception as e:
173
- self.window.update_status("This is not a valid JSON: {}".format(e))
174
- self.window.ui.dialogs.alert("This is not a valid JSON: {}".format(e))
177
+ self.window.update_status(f"This is not a valid JSON: {e}")
178
+ self.window.ui.dialogs.alert(f"This is not a valid JSON: {e}")
175
179
  return
176
180
  path = os.path.join(self.window.core.config.get_user_path(), file)
177
181
  elif file.endswith('.css'):
@@ -189,22 +193,48 @@ class Settings:
189
193
  backup_path = os.path.join(self.window.core.config.get_user_path(), backup_file)
190
194
  if os.path.isfile(path):
191
195
  shutil.copyfile(path, backup_path)
192
- self.window.update_status("Created backup file: {}".format(backup_file))
196
+ self.window.update_status(f"Created backup file: {backup_file}")
197
+
198
+ prev_content = None
199
+ if os.path.isfile(path):
200
+ try:
201
+ with open(path, 'r', encoding="utf-8") as f:
202
+ prev_content = f.read()
203
+ except Exception as e:
204
+ pass
193
205
 
194
206
  # save changes to current file
195
207
  try:
196
208
  with open(path, 'w', encoding="utf-8") as f:
197
209
  f.write(data)
198
- self.window.update_status("Saved file: {}".format(path))
199
- self.window.ui.dialogs.alert("Saved file: {}".format(path))
210
+ self.window.update_status(f"Saved file: {path}")
211
+ except Exception as e:
212
+ self.window.core.debug.log(e)
213
+ self.window.update_status(f"Error saving file: {path}")
214
+ return # abort if error
215
+
216
+ if prev_content == data:
217
+ self.window.update_status(f"Saved file: {path}")
218
+ self.window.ui.dialogs.alert(f"Saved file: {path}")
219
+ return # no changes made, no need to reload
220
+
221
+ if file in ("config.json", "models.json") or file.endswith('.css'):
222
+ self.window.update_status(trans("status.reloading"))
223
+
224
+ QApplication.processEvents() # process events to update UI
225
+
226
+ try:
200
227
  if file == "config.json":
201
228
  self.window.core.config.load_config() # reload config
202
229
  elif file == "models.json":
203
230
  self.window.core.models.load() # reload models
204
231
  elif file.endswith('.css'):
205
- event = RenderEvent(RenderEvent.ON_THEME_CHANGE)
206
- self.window.dispatch(event)
232
+ self.window.dispatch(RenderEvent(RenderEvent.ON_THEME_CHANGE))
207
233
  self.window.controller.theme.reload(force=True) # reload theme
234
+ self.window.update_status(f"Saved file: {path}")
235
+ self.window.ui.dialogs.alert(f"Saved file: {path}")
208
236
  except Exception as e:
209
237
  self.window.core.debug.log(e)
210
- self.window.update_status("Error saving file: {}".format(path))
238
+ self.window.update_status(f"Error reloading saved file: {path}")
239
+
240
+
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.08.07 18:00:00 #
9
+ # Updated Date: 2025.08.24 23:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import uuid
@@ -559,6 +559,19 @@ class Tabs:
559
559
  tab.tooltip = tabs.tabToolTip(tab.idx)
560
560
  tab.updated_at = datetime.now()
561
561
 
562
+ def insert_tab(self, tabs, tab: Tab) -> int:
563
+ """
564
+ Insert tab into the specified tab widget
565
+
566
+ :param tabs: Tabs instance
567
+ :param tab: Tab instance
568
+ :return: new index of the tab
569
+ """
570
+ if tab.new_idx is not None:
571
+ return tabs.insertTab(tab.new_idx, tab.child, tab.title)
572
+ else:
573
+ return tabs.addTab(tab.child, tab.title)
574
+
562
575
  def add_chat(self, tab: Tab):
563
576
  """
564
577
  Add chat tab
@@ -569,10 +582,7 @@ class Tabs:
569
582
  tabs = column.get_tabs()
570
583
  tab.parent = column
571
584
  tab.child = self.window.core.ctx.container.get(tab) # tab is already appended here
572
- if tab.new_idx is not None:
573
- tab.idx = tabs.insertTab(tab.new_idx, tab.child, tab.title)
574
- else:
575
- tab.idx = tabs.addTab(tab.child, tab.title)
585
+ tab.idx = self.insert_tab(tabs, tab)
576
586
  tab.child.setOwner(tab)
577
587
  tabs.setTabIcon(tab.idx, QIcon(tab.icon))
578
588
  if tab.tooltip is not None:
@@ -593,10 +603,7 @@ class Tabs:
593
603
  idx = tab.data_id # restore prev idx
594
604
  tab.child, idx, data_id = self.window.controller.notepad.create(idx, tab)
595
605
  tab.data_id = data_id # notepad idx in db, enumerated from 1
596
- if tab.new_idx is not None:
597
- tab.idx = tabs.insertTab(tab.new_idx, tab.child, tab.title)
598
- else:
599
- tab.idx = tabs.addTab(tab.child, tab.title)
606
+ tab.idx = self.insert_tab(tabs, tab)
600
607
  tab.child.setOwner(tab)
601
608
  tabs.setTabIcon(tab.idx, QIcon(tab.icon))
602
609
  if tab.tooltip is not None:
@@ -612,7 +619,7 @@ class Tabs:
612
619
  tabs = column.get_tabs()
613
620
  tab.parent = column
614
621
  tab.child = self.window.ui.chat.output.explorer.setup()
615
- tab.idx = tabs.addTab(tab.child, tab.title)
622
+ tab.idx = self.insert_tab(tabs, tab)
616
623
  tab.child.setOwner(tab)
617
624
  tabs.setTabIcon(tab.idx, QIcon(tab.icon))
618
625
  if tab.tooltip is not None:
@@ -629,7 +636,7 @@ class Tabs:
629
636
  tab.parent = column
630
637
  tab.child = self.window.ui.chat.output.painter.setup()
631
638
  tab.child.append(self.window.ui.painter)
632
- tab.idx = tabs.addTab(tab.child, tab.title)
639
+ tab.idx = self.insert_tab(tabs, tab)
633
640
  tab.child.setOwner(tab)
634
641
  tabs.setTabIcon(tab.idx, QIcon(tab.icon))
635
642
  if tab.tooltip is not None:
@@ -645,7 +652,7 @@ class Tabs:
645
652
  tabs = column.get_tabs()
646
653
  tab.parent = column
647
654
  tab.child = self.window.ui.chat.output.calendar.setup()
648
- tab.idx = tabs.addTab(tab.child, tab.title)
655
+ tab.idx = self.insert_tab(tabs, tab)
649
656
  tab.child.setOwner(tab)
650
657
  tabs.setTabIcon(tab.idx, QIcon(tab.icon))
651
658
  if tab.tooltip is not None:
@@ -669,7 +676,7 @@ class Tabs:
669
676
  tab.title = trans(tool.tab_title)
670
677
  tab.parent = column
671
678
  tab.child = self.from_widget(widget)
672
- tab.idx = tabs.addTab(tab.child, tab.title)
679
+ tab.idx = self.insert_tab(tabs, tab)
673
680
  tab.child.setOwner(tab)
674
681
  tabs.setTabIcon(tab.idx, QIcon(tab.icon))
675
682
  if tab.tooltip is not None:
@@ -6,10 +6,11 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.07.13 01:00:00 #
9
+ # Updated Date: 2025.08.23 21:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from .agent import *
13
+ from .base import *
13
14
  from .mode import *
14
15
  from .model import *
15
16
  from .openai import *
@@ -6,14 +6,14 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.07.30 00:00:00 #
9
+ # Updated Date: 2025.08.23 21:00:00 #
10
10
  # ================================================== #
11
11
 
12
- AGENT_MODE_STEP = "agent.mode.step" # LlamaIndex
13
- AGENT_MODE_PLAN = "agent.mode.plan" # LlamaIndex
14
12
  AGENT_MODE_ASSISTANT = "agent.mode.assistant" # LlamaIndex
15
- AGENT_MODE_WORKFLOW = "agent.mode.workflow" # LlamaIndex
16
13
  AGENT_MODE_OPENAI = "agent.mode.openai" # openai-agent
14
+ AGENT_MODE_PLAN = "agent.mode.plan" # LlamaIndex
15
+ AGENT_MODE_STEP = "agent.mode.step" # LlamaIndex
16
+ AGENT_MODE_WORKFLOW = "agent.mode.workflow" # LlamaIndex
17
17
 
18
18
  AGENT_TYPE_LLAMA = "agent.type.llama" # LlamaIndex
19
19
  AGENT_TYPE_OPENAI = "agent.type.openai" # OpenAI Agent
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ # ================================================== #
4
+ # This file is a part of PYGPT package #
5
+ # Website: https://pygpt.net #
6
+ # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
+ # MIT License #
8
+ # Created By : Marcin Szczygliński #
9
+ # Updated Date: 2025.08.23 21:00:00 #
10
+ # ================================================== #
11
+
12
+ TYPE_BOOL = "bool"
13
+ TYPE_DICT = "dict"
14
+ TYPE_ENUM = "enum"
15
+ TYPE_FLOAT = "float"
16
+ TYPE_INT = "int"
17
+ TYPE_LIST = "list"
18
+ TYPE_STR = "str"
19
+ TYPE_TEXT = "text"
@@ -6,16 +6,16 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.07.21 15:00:00 #
9
+ # Updated Date: 2025.08.23 21:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  class Color:
13
+ BOLD = '\033[1m'
14
+ ENDC = '\033[0m'
15
+ FAIL = '\033[91m'
13
16
  HEADER = '\033[95m'
14
17
  OKBLUE = '\033[94m'
15
18
  OKCYAN = '\033[96m'
16
19
  OKGREEN = '\033[92m'
17
- WARNING = '\033[93m'
18
- FAIL = '\033[91m'
19
- ENDC = '\033[0m'
20
- BOLD = '\033[1m'
21
- UNDERLINE = '\033[4m'
20
+ UNDERLINE = '\033[4m'
21
+ WARNING = '\033[93m'
@@ -6,20 +6,20 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.07.30 00:00:00 #
9
+ # Updated Date: 2025.08.23 21:00:00 #
10
10
  # ================================================== #
11
11
 
12
+ MODE_AGENT = "agent"
13
+ MODE_AGENT_LLAMA = "agent_llama"
14
+ MODE_AGENT_OPENAI = "agent_openai"
15
+ MODE_ASSISTANT = "assistant"
12
16
  MODE_AUDIO = "audio"
13
17
  MODE_CHAT = "chat"
14
18
  MODE_COMPLETION = "completion"
19
+ MODE_COMPUTER = "computer"
20
+ MODE_EXPERT = "expert"
15
21
  MODE_IMAGE = "img"
16
- MODE_VISION = "vision"
17
- MODE_ASSISTANT = "assistant"
18
22
  MODE_LANGCHAIN = "langchain"
19
23
  MODE_LLAMA_INDEX = "llama_index"
20
- MODE_AGENT = "agent"
21
- MODE_AGENT_LLAMA = "agent_llama"
22
- MODE_AGENT_OPENAI = "agent_openai"
23
- MODE_EXPERT = "expert"
24
24
  MODE_RESEARCH = "research"
25
- MODE_COMPUTER = "computer"
25
+ MODE_VISION = "vision"
@@ -6,10 +6,10 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.03.02 19:00:00 #
9
+ # Updated Date: 2025.08.23 21:00:00 #
10
10
  # ================================================== #
11
11
 
12
- MULTIMODAL_TEXT = "text"
13
- MULTIMODAL_IMAGE = "image"
14
12
  MULTIMODAL_AUDIO = "audio"
13
+ MULTIMODAL_IMAGE = "image"
14
+ MULTIMODAL_TEXT = "text"
15
15
  MULTIMODAL_VIDEO = "video"
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.08.08 19:00:00 #
9
+ # Updated Date: 2025.08.24 03:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  OPENAI_COMPATIBLE_PROVIDERS = [
@@ -17,6 +17,7 @@ OPENAI_COMPATIBLE_PROVIDERS = [
17
17
  "huggingface_router",
18
18
  "local_ai",
19
19
  "mistral_ai",
20
+ "ollama",
20
21
  "perplexity",
21
22
  "deepseek_api",
22
23
  "x_ai",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "__meta__": {
3
- "version": "2.6.20",
4
- "app.version": "2.6.20",
5
- "updated_at": "2025-08-22T00:00:00"
3
+ "version": "2.6.22",
4
+ "app.version": "2.6.22",
5
+ "updated_at": "2025-08-25T00:00:00"
6
6
  },
7
7
  "access.audio.event.speech": false,
8
8
  "access.audio.event.speech.disabled": [],
@@ -63,6 +63,7 @@
63
63
  "agent.mode": "chat",
64
64
  "agent.openai.provider": "openai_agent_base",
65
65
  "agent.openai.response.split": true,
66
+ "agent.output.render.all": true,
66
67
  "ai_name": "",
67
68
  "api_azure_version": "2023-07-01-preview",
68
69
  "api_azure_endpoint": "https://<your-resource-name>.openai.azure.com/",
@@ -221,7 +222,6 @@
221
222
  "llama.idx.auto": false,
222
223
  "llama.idx.auto.index": "base",
223
224
  "llama.idx.auto.modes": "chat,completion,vision,assistant,research,llama_index,agent",
224
- "llama.idx.chat.agent.render.all": false,
225
225
  "llama.idx.chat.auto_retrieve": true,
226
226
  "llama.idx.chat.mode": "context",
227
227
  "llama.idx.current": null,
@@ -422,7 +422,7 @@
422
422
  }
423
423
  },
424
424
  "temperature": 1.0,
425
- "theme": "dark",
425
+ "theme": "dark_darker",
426
426
  "theme.markdown": true,
427
427
  "theme.style": "chatgpt",
428
428
  "top_p": 1.0,
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "__meta__": {
3
- "version": "2.6.20",
4
- "app.version": "2.6.20",
5
- "updated_at": "2025-08-22T23:07:35"
3
+ "version": "2.6.22",
4
+ "app.version": "2.6.22",
5
+ "updated_at": "2025-08-25T23:07:35"
6
6
  },
7
7
  "items": {
8
8
  "SpeakLeash/bielik-11b-v2.3-instruct:Q4_K_M": {
@@ -12,6 +12,7 @@
12
12
  "chat",
13
13
  "llama_index",
14
14
  "agent_llama",
15
+ "agent_openai",
15
16
  "agent",
16
17
  "expert"
17
18
  ],
@@ -311,6 +312,7 @@
311
312
  "llama_index",
312
313
  "agent",
313
314
  "agent_llama",
315
+ "agent_openai",
314
316
  "expert",
315
317
  "chat"
316
318
  ],
@@ -492,6 +494,7 @@
492
494
  "llama_index",
493
495
  "agent",
494
496
  "agent_llama",
497
+ "agent_openai",
495
498
  "expert",
496
499
  "chat"
497
500
  ],
@@ -531,6 +534,7 @@
531
534
  "llama_index",
532
535
  "agent",
533
536
  "agent_llama",
537
+ "agent_openai",
534
538
  "expert",
535
539
  "chat"
536
540
  ],
@@ -570,6 +574,7 @@
570
574
  "llama_index",
571
575
  "agent",
572
576
  "agent_llama",
577
+ "agent_openai",
573
578
  "expert",
574
579
  "chat"
575
580
  ],
@@ -2567,6 +2572,7 @@
2567
2572
  "llama_index",
2568
2573
  "agent",
2569
2574
  "agent_llama",
2575
+ "agent_openai",
2570
2576
  "expert",
2571
2577
  "chat"
2572
2578
  ],
@@ -2601,6 +2607,7 @@
2601
2607
  "llama_index",
2602
2608
  "agent",
2603
2609
  "agent_llama",
2610
+ "agent_openai",
2604
2611
  "expert",
2605
2612
  "chat"
2606
2613
  ],
@@ -2635,6 +2642,7 @@
2635
2642
  "llama_index",
2636
2643
  "agent",
2637
2644
  "agent_llama",
2645
+ "agent_openai",
2638
2646
  "expert",
2639
2647
  "chat"
2640
2648
  ],
@@ -2669,6 +2677,7 @@
2669
2677
  "llama_index",
2670
2678
  "agent",
2671
2679
  "agent_llama",
2680
+ "agent_openai",
2672
2681
  "expert",
2673
2682
  "chat"
2674
2683
  ],
@@ -2703,6 +2712,7 @@
2703
2712
  "llama_index",
2704
2713
  "agent",
2705
2714
  "agent_llama",
2715
+ "agent_openai",
2706
2716
  "expert",
2707
2717
  "chat"
2708
2718
  ],
@@ -2737,6 +2747,7 @@
2737
2747
  "llama_index",
2738
2748
  "agent",
2739
2749
  "agent_llama",
2750
+ "agent_openai",
2740
2751
  "expert",
2741
2752
  "chat"
2742
2753
  ],
@@ -2771,6 +2782,7 @@
2771
2782
  "llama_index",
2772
2783
  "agent",
2773
2784
  "agent_llama",
2785
+ "agent_openai",
2774
2786
  "expert",
2775
2787
  "chat"
2776
2788
  ],
@@ -3441,6 +3453,7 @@
3441
3453
  "llama_index",
3442
3454
  "agent",
3443
3455
  "agent_llama",
3456
+ "agent_openai",
3444
3457
  "expert",
3445
3458
  "chat"
3446
3459
  ],
@@ -3475,6 +3488,7 @@
3475
3488
  "llama_index",
3476
3489
  "agent",
3477
3490
  "agent_llama",
3491
+ "agent_openai",
3478
3492
  "expert",
3479
3493
  "chat"
3480
3494
  ],
@@ -3509,6 +3523,7 @@
3509
3523
  "llama_index",
3510
3524
  "agent",
3511
3525
  "agent_llama",
3526
+ "agent_openai",
3512
3527
  "expert",
3513
3528
  "chat"
3514
3529
  ],
@@ -3543,6 +3558,7 @@
3543
3558
  "llama_index",
3544
3559
  "agent",
3545
3560
  "agent_llama",
3561
+ "agent_openai",
3546
3562
  "expert",
3547
3563
  "chat"
3548
3564
  ],
@@ -1629,20 +1629,6 @@
1629
1629
  "advanced": false,
1630
1630
  "tab": "chat"
1631
1631
  },
1632
- "llama.idx.chat.agent.render.all": {
1633
- "section": "llama-index",
1634
- "type": "bool",
1635
- "slider": false,
1636
- "label": "settings.llama.idx.chat.agent.render.all",
1637
- "description": "settings.llama.idx.chat.agent.render.all.desc",
1638
- "value": false,
1639
- "min": 0,
1640
- "max": 0,
1641
- "multiplier": 1,
1642
- "step": 1,
1643
- "advanced": false,
1644
- "tab": "chat"
1645
- },
1646
1632
  "llama.idx.chat.auto_retrieve": {
1647
1633
  "section": "llama-index",
1648
1634
  "type": "bool",
@@ -1986,6 +1972,20 @@
1986
1972
  "advanced": false,
1987
1973
  "tab": "general"
1988
1974
  },
1975
+ "agent.output.render.all": {
1976
+ "section": "agent",
1977
+ "type": "bool",
1978
+ "slider": false,
1979
+ "label": "settings.agent.output.render.all",
1980
+ "description": "settings.agent.output.render.all.desc",
1981
+ "value": true,
1982
+ "min": 0,
1983
+ "max": 0,
1984
+ "multiplier": 1,
1985
+ "step": 1,
1986
+ "advanced": false,
1987
+ "tab": "general"
1988
+ },
1989
1989
  "agent.mode": {
1990
1990
  "section": "agent",
1991
1991
  "type": "combo",
@@ -1347,6 +1347,9 @@ status.preset.deleted = Voreinstellung gelöscht
1347
1347
  status.preset.duplicated = Voreinstellung dupliziert
1348
1348
  status.preset.empty_id = WARNUNG: Voreinstellungs-ID (Dateiname) ist leer! Abbruch...
1349
1349
  status.preset.saved = Voreinstellung gespeichert
1350
+ status.reloading = Aktualisieren... Bitte warten
1351
+ status.reloading.profile.begin = Aktualisieren der Komponenten... bitte warten...
1352
+ status.reloading.profile.end = [OK] Komponenten erfolgreich aktualisiert.
1350
1353
  status.saved = Gespeichert
1351
1354
  status.sending = Bitte warten...
1352
1355
  status.started = Bereit
@@ -1356,7 +1359,7 @@ status.tokens = Token
1356
1359
  status.uploaded = Dateien hochgeladen
1357
1360
  status.uploading = Dateien hochladen...
1358
1361
  tab.close_all.confirm = Bist du sicher, dass du alle Tabs schließen möchtest?
1359
- text.context_menu.audio.read = Ausgewählten Text vorlesen (Sprachsynthese)...
1362
+ text.context_menu.audio.read = Lesen (Sprachsynthese)
1360
1363
  text.context_menu.copy_to = Kopieren zu...
1361
1364
  text.context_menu.copy_to.calendar = Kalender
1362
1365
  text.context_menu.copy_to.input = Eingabe
@@ -1025,6 +1025,8 @@ settings.agent.mode = Sub-mode for agents
1025
1025
  settings.agent.mode.desc = Sub-mode to use in Agent (Autonomous) mode
1026
1026
  settings.agent.openai.response.split = Split response messages
1027
1027
  settings.agent.openai.response.split.desc = Split response messages to separated context items in OpenAI Agents mode.
1028
+ settings.agent.output.render.all = Display full agent output in chat view
1029
+ settings.agent.output.render.all.desc = If enabled, then full output from agent will be displayed in chat window if agent is enabled.
1028
1030
  settings.api_azure_endpoint = API Endpoint
1029
1031
  settings.api_azure_endpoint.desc = Azure OpenAI API endpoint, https://<your-resource-name>.openai.azure.com/
1030
1032
  settings.api_azure_version = OpenAI API version
@@ -1189,8 +1191,6 @@ settings.llama.hub.loaders.args = Additional keyword arguments (**kwargs) for da
1189
1191
  settings.llama.hub.loaders.args.desc = Additional keyword arguments (**kwargs), such as settings, API keys, for the data loader. These arguments will be passed to the loader; please refer to the PyGPT documentation or LlamaHub loaders reference for a list of allowed arguments for the specified data loader. One argument per single row.
1190
1192
  settings.llama.hub.loaders.use_local = Use local models in Video/Audio and Image (vision) loaders
1191
1193
  settings.llama.hub.loaders.use_local.desc = Enable usage of local models in Video/Audio and Image (vision) loaders. If disabled, then API models will be used (GPT-4 Vision and Whisper). Note: local models will work only in the Python version (not compiled/Snap).
1192
- settings.llama.idx.chat.agent.render.all = Display full agent output in chat view
1193
- settings.llama.idx.chat.agent.render.all.desc = If enabled, then full output from agent will be displayed in chat window if agent is enabled.
1194
1194
  settings.llama.idx.chat.auto_retrieve = Auto-retrieve additional context
1195
1195
  settings.llama.idx.chat.auto_retrieve.desc = If enabled, additional context will be retrieved with every query and appended to system prompt.
1196
1196
  settings.llama.idx.chat.mode = Chat mode
@@ -1359,6 +1359,9 @@ status.preset.deleted = Preset has been deleted.
1359
1359
  status.preset.duplicated = Preset has been duplicated.
1360
1360
  status.preset.empty_id = WARNING: Preset ID (filename) is empty! Aborting...
1361
1361
  status.preset.saved = Preset has been saved.
1362
+ status.reloading = Reloading... Please wait
1363
+ status.reloading.profile.begin = Reloading components... please wait...
1364
+ status.reloading.profile.end = [OK] Components reloaded successfully.
1362
1365
  status.saved = Saved
1363
1366
  status.sending = Please wait...
1364
1367
  status.started = Ready
@@ -1368,7 +1371,7 @@ status.tokens = Tokens
1368
1371
  status.uploaded = Files have been uploaded
1369
1372
  status.uploading = Uploading files...
1370
1373
  tab.close_all.confirm = Are you sure you want to close all tabs?
1371
- text.context_menu.audio.read = Read selected text (speech synthesis)...
1374
+ text.context_menu.audio.read = Read (speech synthesis)
1372
1375
  text.context_menu.copy_to = Copy to...
1373
1376
  text.context_menu.copy_to.calendar = Calendar
1374
1377
  text.context_menu.copy_to.input = Input
@@ -1348,6 +1348,9 @@ status.preset.deleted = Ajuste preestablecido eliminado
1348
1348
  status.preset.duplicated = Ajuste preestablecido duplicado
1349
1349
  status.preset.empty_id = ADVERTENCIA: ¡El ID del ajuste preestablecido (nombre de archivo) está vacío! Abortando...
1350
1350
  status.preset.saved = Ajuste preestablecido guardado
1351
+ status.reloading = Actualizando... Por favor, espere
1352
+ status.reloading.profile.begin = Actualizando componentes... por favor, espere...
1353
+ status.reloading.profile.end = [OK] Componentes actualizados con éxito.
1351
1354
  status.saved = Guardado
1352
1355
  status.sending = Por favor, espere...
1353
1356
  status.started = Listo
@@ -1357,7 +1360,7 @@ status.tokens = Tokens
1357
1360
  status.uploaded = Archivos subidos
1358
1361
  status.uploading = Subiendo archivos...
1359
1362
  tab.close_all.confirm = ¿Estás seguro de cerrar todas las pestañas?
1360
- text.context_menu.audio.read = Leer texto seleccionado (síntesis de voz)...
1363
+ text.context_menu.audio.read = Leer (síntesis de voz)
1361
1364
  text.context_menu.copy_to = Copiar a...
1362
1365
  text.context_menu.copy_to.calendar = Calendario
1363
1366
  text.context_menu.copy_to.input = Entrada
@@ -1347,6 +1347,9 @@ status.preset.deleted = Préréglage supprimé
1347
1347
  status.preset.duplicated = Préréglage dupliqué
1348
1348
  status.preset.empty_id = ATTENTION : L'ID du préréglage (nom de fichier) est vide ! Annulation...
1349
1349
  status.preset.saved = Préréglage sauvegardé
1350
+ status.reloading = Actualisation... Veuillez patienter
1351
+ status.reloading.profile.begin = Actualisation des composants... veuillez patienter...
1352
+ status.reloading.profile.end = [OK] Composants actualisés avec succès.
1350
1353
  status.saved = Sauvegardé
1351
1354
  status.sending = Veuillez patienter...
1352
1355
  status.started = Prêt
@@ -1356,7 +1359,7 @@ status.tokens = Jetons
1356
1359
  status.uploaded = Les fichiers sont téléversés
1357
1360
  status.uploading = Téléversement des fichiers...
1358
1361
  tab.close_all.confirm = Êtes-vous sûr de vouloir fermer tous les onglets ?
1359
- text.context_menu.audio.read = Lire le texte sélectionné (synthèse vocale)...
1362
+ text.context_menu.audio.read = Lire (synthèse vocale)
1360
1363
  text.context_menu.copy_to = Copier vers...
1361
1364
  text.context_menu.copy_to.calendar = Calendrier
1362
1365
  text.context_menu.copy_to.input = Entrée