pygpt-net 2.6.45__py3-none-any.whl → 2.6.47__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 (77) hide show
  1. pygpt_net/CHANGELOG.txt +12 -0
  2. pygpt_net/__init__.py +3 -3
  3. pygpt_net/controller/__init__.py +1 -3
  4. pygpt_net/controller/audio/audio.py +2 -0
  5. pygpt_net/controller/chat/text.py +2 -1
  6. pygpt_net/controller/debug/debug.py +11 -9
  7. pygpt_net/controller/dialogs/debug.py +40 -29
  8. pygpt_net/controller/notepad/notepad.py +0 -2
  9. pygpt_net/controller/theme/theme.py +5 -5
  10. pygpt_net/controller/ui/tabs.py +40 -2
  11. pygpt_net/core/debug/agent.py +19 -14
  12. pygpt_net/core/debug/assistants.py +22 -24
  13. pygpt_net/core/debug/attachments.py +11 -7
  14. pygpt_net/core/debug/config.py +22 -23
  15. pygpt_net/core/debug/context.py +63 -63
  16. pygpt_net/core/debug/db.py +1 -4
  17. pygpt_net/core/debug/events.py +14 -11
  18. pygpt_net/core/debug/indexes.py +41 -76
  19. pygpt_net/core/debug/kernel.py +11 -8
  20. pygpt_net/core/debug/models.py +20 -15
  21. pygpt_net/core/debug/plugins.py +9 -6
  22. pygpt_net/core/debug/presets.py +16 -11
  23. pygpt_net/core/debug/tabs.py +28 -22
  24. pygpt_net/core/debug/ui.py +25 -22
  25. pygpt_net/core/render/web/renderer.py +5 -2
  26. pygpt_net/core/tabs/tab.py +16 -3
  27. pygpt_net/data/config/config.json +3 -3
  28. pygpt_net/data/config/models.json +3 -3
  29. pygpt_net/data/config/settings.json +15 -17
  30. pygpt_net/data/css/style.dark.css +6 -0
  31. pygpt_net/data/css/web-blocks.css +4 -0
  32. pygpt_net/data/css/web-blocks.light.css +1 -1
  33. pygpt_net/data/css/web-chatgpt.css +4 -0
  34. pygpt_net/data/css/web-chatgpt.light.css +1 -1
  35. pygpt_net/data/css/web-chatgpt_wide.css +4 -0
  36. pygpt_net/data/css/web-chatgpt_wide.light.css +1 -1
  37. pygpt_net/data/js/app.js +1804 -1688
  38. pygpt_net/data/locale/locale.de.ini +1 -1
  39. pygpt_net/data/locale/locale.en.ini +1 -1
  40. pygpt_net/data/locale/locale.es.ini +1 -1
  41. pygpt_net/data/locale/locale.fr.ini +1 -1
  42. pygpt_net/data/locale/locale.it.ini +1 -1
  43. pygpt_net/data/locale/locale.pl.ini +2 -2
  44. pygpt_net/data/locale/locale.uk.ini +1 -1
  45. pygpt_net/data/locale/locale.zh.ini +1 -1
  46. pygpt_net/item/model.py +4 -1
  47. pygpt_net/js_rc.py +14303 -14540
  48. pygpt_net/provider/api/anthropic/__init__.py +3 -1
  49. pygpt_net/provider/api/anthropic/tools.py +1 -1
  50. pygpt_net/provider/api/google/__init__.py +7 -1
  51. pygpt_net/provider/api/x_ai/__init__.py +5 -1
  52. pygpt_net/provider/core/config/patch.py +14 -1
  53. pygpt_net/provider/llms/anthropic.py +37 -5
  54. pygpt_net/provider/llms/azure_openai.py +3 -1
  55. pygpt_net/provider/llms/base.py +13 -1
  56. pygpt_net/provider/llms/deepseek_api.py +13 -3
  57. pygpt_net/provider/llms/google.py +14 -1
  58. pygpt_net/provider/llms/hugging_face_api.py +105 -24
  59. pygpt_net/provider/llms/hugging_face_embedding.py +88 -0
  60. pygpt_net/provider/llms/hugging_face_router.py +28 -16
  61. pygpt_net/provider/llms/local.py +2 -0
  62. pygpt_net/provider/llms/mistral.py +60 -3
  63. pygpt_net/provider/llms/open_router.py +4 -2
  64. pygpt_net/provider/llms/openai.py +4 -1
  65. pygpt_net/provider/llms/perplexity.py +66 -5
  66. pygpt_net/provider/llms/utils.py +39 -0
  67. pygpt_net/provider/llms/voyage.py +50 -0
  68. pygpt_net/provider/llms/x_ai.py +70 -10
  69. pygpt_net/ui/widget/lists/db.py +1 -0
  70. pygpt_net/ui/widget/lists/debug.py +1 -0
  71. pygpt_net/ui/widget/tabs/body.py +23 -4
  72. pygpt_net/ui/widget/textarea/notepad.py +0 -4
  73. {pygpt_net-2.6.45.dist-info → pygpt_net-2.6.47.dist-info}/METADATA +16 -4
  74. {pygpt_net-2.6.45.dist-info → pygpt_net-2.6.47.dist-info}/RECORD +77 -74
  75. {pygpt_net-2.6.45.dist-info → pygpt_net-2.6.47.dist-info}/LICENSE +0 -0
  76. {pygpt_net-2.6.45.dist-info → pygpt_net-2.6.47.dist-info}/WHEEL +0 -0
  77. {pygpt_net-2.6.45.dist-info → pygpt_net-2.6.47.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.02.25 22:00:00 #
9
+ # Updated Date: 2025.09.14 20:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
 
@@ -45,30 +45,33 @@ class UIDebug:
45
45
  :param items: items
46
46
  :param name: name
47
47
  """
48
- self.window.core.debug.add(self.id, 'ui.' + name, str(self.map_structure(items)))
48
+ self.window.core.debug.add(self.id, f"ui.{name}", str(self.map_structure(items)))
49
49
 
50
50
  def update(self):
51
51
  """Update debug window"""
52
- self.window.core.debug.begin(self.id)
52
+ # Local references
53
+ debug = self.window.core.debug
54
+ lang_mapping = self.window.controller.lang.mapping.get_mapping()
55
+ ui = self.window.ui
53
56
 
54
- self.window.core.debug.add(
55
- self.id, '*lang_mapping',
56
- str(self.map_structure(self.window.controller.lang.mapping.get_mapping(), True))
57
- )
57
+ debug.begin(self.id)
58
58
 
59
- self.update_section(self.window.ui.config, 'config')
60
- self.update_section(self.window.ui.debug, 'debug')
61
- self.update_section(self.window.ui.dialog, 'dialog')
62
- self.update_section(self.window.ui.editor, 'editor')
63
- self.update_section(self.window.ui.groups, 'groups')
64
- self.update_section(self.window.ui.hooks, 'hooks')
65
- self.update_section(self.window.ui.menu, 'menu')
66
- self.update_section(self.window.ui.models, 'models')
67
- self.update_section(self.window.ui.nodes, 'nodes')
68
- self.update_section(self.window.ui.notepad, 'notepad')
69
- self.update_section(self.window.ui.paths, 'paths')
70
- self.update_section(self.window.ui.plugin_addon, 'plugin_addon')
71
- self.update_section(self.window.ui.splitters, 'splitters')
72
- self.update_section(self.window.ui.tabs, 'tabs')
59
+ debug.add(self.id, '*lang_mapping', str(self.map_structure(lang_mapping, True)))
73
60
 
74
- self.window.core.debug.end(self.id)
61
+ # Update sections using local 'ui' reference
62
+ self.update_section(ui.config, 'config')
63
+ self.update_section(ui.debug, 'debug')
64
+ self.update_section(ui.dialog, 'dialog')
65
+ self.update_section(ui.editor, 'editor')
66
+ self.update_section(ui.groups, 'groups')
67
+ self.update_section(ui.hooks, 'hooks')
68
+ self.update_section(ui.menu, 'menu')
69
+ self.update_section(ui.models, 'models')
70
+ self.update_section(ui.nodes, 'nodes')
71
+ self.update_section(ui.notepad, 'notepad')
72
+ self.update_section(ui.paths, 'paths')
73
+ self.update_section(ui.plugin_addon, 'plugin_addon')
74
+ self.update_section(ui.splitters, 'splitters')
75
+ self.update_section(ui.tabs, 'tabs')
76
+
77
+ debug.end(self.id)
@@ -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.09.13 06:10:00 #
9
+ # Updated Date: 2025.09.14 20:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import gc
@@ -210,6 +210,8 @@ class Renderer(BaseRenderer):
210
210
  :param meta: context meta
211
211
  """
212
212
  node = self.get_output_node(meta)
213
+ if not node:
214
+ return
213
215
  node.set_meta(meta)
214
216
  self.reset(meta)
215
217
  try:
@@ -884,6 +886,7 @@ class Renderer(BaseRenderer):
884
886
  :param pid: context PID
885
887
  :param payload: payload to append
886
888
  :param flush: True if flush immediately (legacy HTML path)
889
+ :param replace: True if replace whole output (legacy HTML path)
887
890
  """
888
891
  if self.pids[pid].loaded and not self.pids[pid].use_buffer:
889
892
  self.clear_chunks(pid)
@@ -1291,10 +1294,10 @@ class Renderer(BaseRenderer):
1291
1294
  :param meta: context meta
1292
1295
  """
1293
1296
  tab = node.get_tab()
1297
+ tab.delete_ref(node)
1294
1298
  layout = tab.child.layout()
1295
1299
  layout.removeWidget(node)
1296
1300
  self.window.ui.nodes['output'].pop(tab.pid, None)
1297
- tab.child.delete_refs()
1298
1301
 
1299
1302
  node.on_delete()
1300
1303
 
@@ -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.09.05 18:00:00 #
9
+ # Updated Date: 2025.09.14 20:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from datetime import datetime
@@ -109,7 +109,7 @@ class Tab:
109
109
  def cleanup(self):
110
110
  """Clean up on delete"""
111
111
  try:
112
- if self.on_delete:
112
+ if self.on_delete and callable(self.on_delete):
113
113
  self.on_delete(self)
114
114
  self.delete_refs()
115
115
  except Exception as e:
@@ -131,7 +131,7 @@ class Tab:
131
131
  Delete all references to widgets in this tab
132
132
  """
133
133
  # cleanup children
134
- if self.child:
134
+ if self.child and hasattr(self.child, 'cleanup'):
135
135
  self.child.cleanup()
136
136
 
137
137
  # cleanup parent
@@ -140,6 +140,19 @@ class Tab:
140
140
  ref.deleteLater()
141
141
  del self.refs[:]
142
142
 
143
+ def delete_ref(self, widget: Any) -> None:
144
+ """
145
+ Unpin reference to widget in this tab
146
+
147
+ :param widget: widget reference
148
+ """
149
+ for ref in self.refs:
150
+ if ref and ref is widget:
151
+ self.refs.remove(ref)
152
+ break
153
+ if self.child and hasattr(self.child, 'delete_ref'):
154
+ self.child.delete_ref(widget)
155
+
143
156
  def to_dict(self) -> Dict[str, Any]:
144
157
  """
145
158
  Convert to dict
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "__meta__": {
3
- "version": "2.6.45",
4
- "app.version": "2.6.45",
5
- "updated_at": "2025-09-13T00:00:00"
3
+ "version": "2.6.47",
4
+ "app.version": "2.6.47",
5
+ "updated_at": "2025-09-15T00:00:00"
6
6
  },
7
7
  "access.audio.event.speech": false,
8
8
  "access.audio.event.speech.disabled": [],
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "__meta__": {
3
- "version": "2.6.45",
4
- "app.version": "2.6.45",
5
- "updated_at": "2025-09-13T08:03:34"
3
+ "version": "2.6.47",
4
+ "app.version": "2.6.47",
5
+ "updated_at": "2025-09-15T08:03:34"
6
6
  },
7
7
  "items": {
8
8
  "SpeakLeash/bielik-11b-v2.3-instruct:Q4_K_M": {
@@ -53,22 +53,7 @@
53
53
  "secret": false,
54
54
  "advanced": false,
55
55
  "tab": "OpenAI"
56
- },
57
- "api_proxy": {
58
- "section": "api_keys",
59
- "type": "text",
60
- "slider": false,
61
- "label": "settings.api_proxy",
62
- "description": "settings.api_proxy.desc",
63
- "value": "",
64
- "min": null,
65
- "max": null,
66
- "multiplier": null,
67
- "step": null,
68
- "secret": false,
69
- "advanced": false,
70
- "tab": "OpenAI"
71
- },
56
+ },
72
57
  "api_use_responses": {
73
58
  "section": "api_keys",
74
59
  "type": "bool",
@@ -593,7 +578,20 @@
593
578
  "multiplier": 1,
594
579
  "step": 1,
595
580
  "advanced": false
596
- },
581
+ },
582
+ "api_proxy": {
583
+ "section": "general",
584
+ "type": "text",
585
+ "slider": false,
586
+ "label": "settings.api_proxy",
587
+ "description": "settings.api_proxy.desc",
588
+ "value": "",
589
+ "min": null,
590
+ "max": null,
591
+ "multiplier": null,
592
+ "step": null,
593
+ "secret": false
594
+ },
597
595
  "theme.style": {
598
596
  "section": "layout",
599
597
  "type": "combo",
@@ -133,4 +133,10 @@ QCalendarWidget QAbstractItemView::item:hover {{
133
133
  }}
134
134
  .file-explorer QTreeView::branch {{
135
135
  background: #262a2e;
136
+ }}
137
+
138
+ .DebugList::item:selected,
139
+ .DebugList::item:selected:focus {{
140
+ color: #000;
141
+ selection-color: #000000;
136
142
  }}
@@ -445,4 +445,8 @@ li div:first-child {{
445
445
  .code-wrapper pre code {{
446
446
  max-height: 1000px;
447
447
  overflow-y: auto;
448
+ }}
449
+
450
+ #_append_output_ .msg-bot {{
451
+ margin-top: 0px !important;
448
452
  }}
@@ -93,5 +93,5 @@ code {{
93
93
  color: #6e6e6e;
94
94
  }}
95
95
  .msg-box .name-header.name-bot {{
96
- color: #a3a3a3;
96
+ color: #7a787c;
97
97
  }}
@@ -476,4 +476,8 @@ li div:first-child {{
476
476
  .code-wrapper pre code {{
477
477
  max-height: 1000px;
478
478
  overflow-y: auto;
479
+ }}
480
+
481
+ #_append_output_ .msg-bot {{
482
+ margin-top: 0px !important;
479
483
  }}
@@ -96,5 +96,5 @@ code {{
96
96
  color: #6e6e6e;
97
97
  }}
98
98
  .msg-box .name-header.name-bot {{
99
- color: #a3a3a3;
99
+ color: #7a787c;
100
100
  }}
@@ -472,4 +472,8 @@ li div:first-child {{
472
472
  .code-wrapper pre code {{
473
473
  max-height: 1000px;
474
474
  overflow-y: auto;
475
+ }}
476
+
477
+ #_append_output_ .msg-bot {{
478
+ margin-top: 0px !important;
475
479
  }}
@@ -93,5 +93,5 @@ code {{
93
93
  color: #6e6e6e;
94
94
  }}
95
95
  .msg-box .name-header.name-bot {{
96
- color: #a3a3a3;
96
+ color: #7a787c;
97
97
  }}