pygpt-net 2.6.38__py3-none-any.whl → 2.6.40__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.
- pygpt_net/CHANGELOG.txt +9 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/controller/model/editor.py +20 -42
- pygpt_net/controller/painter/common.py +0 -8
- pygpt_net/core/render/web/body.py +292 -441
- pygpt_net/data/config/config.json +3 -3
- pygpt_net/data/config/models.json +3 -3
- pygpt_net/data/css/web-blocks.css +1 -1
- pygpt_net/data/css/web-chatgpt.css +1 -1
- pygpt_net/data/css/web-chatgpt_wide.css +1 -1
- pygpt_net/provider/core/config/patch.py +9 -0
- pygpt_net/ui/dialog/models.py +157 -9
- pygpt_net/utils.py +12 -13
- {pygpt_net-2.6.38.dist-info → pygpt_net-2.6.40.dist-info}/METADATA +11 -2
- {pygpt_net-2.6.38.dist-info → pygpt_net-2.6.40.dist-info}/RECORD +18 -18
- {pygpt_net-2.6.38.dist-info → pygpt_net-2.6.40.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.38.dist-info → pygpt_net-2.6.40.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.38.dist-info → pygpt_net-2.6.40.dist-info}/entry_points.txt +0 -0
pygpt_net/CHANGELOG.txt
CHANGED
pygpt_net/__init__.py
CHANGED
|
@@ -6,15 +6,15 @@
|
|
|
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.
|
|
9
|
+
# Updated Date: 2025.09.06 00:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
__author__ = "Marcin Szczygliński"
|
|
13
13
|
__copyright__ = "Copyright 2025, Marcin Szczygliński"
|
|
14
14
|
__credits__ = ["Marcin Szczygliński"]
|
|
15
15
|
__license__ = "MIT"
|
|
16
|
-
__version__ = "2.6.
|
|
17
|
-
__build__ = "2025-09-
|
|
16
|
+
__version__ = "2.6.40"
|
|
17
|
+
__build__ = "2025-09-06"
|
|
18
18
|
__maintainer__ = "Marcin Szczygliński"
|
|
19
19
|
__github__ = "https://github.com/szczyglis-dev/py-gpt"
|
|
20
20
|
__report__ = "https://github.com/szczyglis-dev/py-gpt/issues"
|
|
@@ -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.
|
|
9
|
+
# Updated Date: 2025.09.05 18:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
import copy
|
|
@@ -69,7 +69,6 @@ class Editor:
|
|
|
69
69
|
"type": "bool",
|
|
70
70
|
"label": "model.tool_calls",
|
|
71
71
|
"description": "model.tool_calls.desc",
|
|
72
|
-
"advanced": True,
|
|
73
72
|
},
|
|
74
73
|
"input": {
|
|
75
74
|
"type": "bool_list", # list of comma separated values
|
|
@@ -424,15 +423,14 @@ class Editor:
|
|
|
424
423
|
|
|
425
424
|
:param idx: tab index
|
|
426
425
|
"""
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
self.window.ui.nodes['models.list'].setCurrentIndex(current)
|
|
426
|
+
if idx is None:
|
|
427
|
+
return
|
|
428
|
+
# Resolve model id using the filtered view mapping
|
|
429
|
+
model_id = self.window.model_settings.get_model_id_by_row(idx)
|
|
430
|
+
if model_id is not None:
|
|
431
|
+
self.current = model_id
|
|
432
|
+
current = self.window.ui.models['models.list'].index(idx, 0)
|
|
433
|
+
self.window.ui.nodes['models.list'].setCurrentIndex(current)
|
|
436
434
|
|
|
437
435
|
def set_tab_by_id(self, model_id: str):
|
|
438
436
|
"""
|
|
@@ -441,57 +439,37 @@ class Editor:
|
|
|
441
439
|
:param model_id: model id
|
|
442
440
|
"""
|
|
443
441
|
idx = self.get_tab_idx(model_id)
|
|
442
|
+
if idx is None:
|
|
443
|
+
return
|
|
444
444
|
current = self.window.ui.models['models.list'].index(idx, 0)
|
|
445
445
|
self.window.ui.nodes['models.list'].setCurrentIndex(current)
|
|
446
446
|
|
|
447
|
-
def get_tab_idx(self, model_id: str) -> int:
|
|
447
|
+
def get_tab_idx(self, model_id: str) -> Optional[int]:
|
|
448
448
|
"""
|
|
449
|
-
Get model list index
|
|
449
|
+
Get model list index (in the current filtered view)
|
|
450
450
|
|
|
451
451
|
:param model_id: model id
|
|
452
452
|
:return: list index
|
|
453
453
|
"""
|
|
454
|
-
|
|
455
|
-
i = 0
|
|
456
|
-
self.window.core.models.sort_items()
|
|
457
|
-
for id in self.window.core.models.get_ids():
|
|
458
|
-
if id == model_id:
|
|
459
|
-
model_idx = i
|
|
460
|
-
break
|
|
461
|
-
i += 1
|
|
462
|
-
return model_idx
|
|
454
|
+
return self.window.model_settings.get_row_by_model_id(model_id)
|
|
463
455
|
|
|
464
|
-
def get_tab_by_id(self, model_id: str) -> int:
|
|
456
|
+
def get_tab_by_id(self, model_id: str) -> Optional[int]:
|
|
465
457
|
"""
|
|
466
|
-
Get model list index
|
|
458
|
+
Get model list index (alias to get_tab_idx for compatibility)
|
|
467
459
|
|
|
468
460
|
:param model_id: model id
|
|
469
461
|
:return: list index
|
|
470
462
|
"""
|
|
471
|
-
|
|
472
|
-
i = 0
|
|
473
|
-
self.window.core.models.sort_items()
|
|
474
|
-
for id in self.window.core.models.get_ids():
|
|
475
|
-
if id == model_id:
|
|
476
|
-
model_idx = i
|
|
477
|
-
break
|
|
478
|
-
i += 1
|
|
479
|
-
return model_idx
|
|
463
|
+
return self.get_tab_idx(model_id)
|
|
480
464
|
|
|
481
465
|
def get_model_by_tab_idx(self, idx: int) -> Optional[str]:
|
|
482
466
|
"""
|
|
483
|
-
Get model key by list index
|
|
467
|
+
Get model key by list index (in the current filtered view)
|
|
484
468
|
|
|
485
469
|
:param idx: list index
|
|
486
470
|
:return: model key
|
|
487
471
|
"""
|
|
488
|
-
|
|
489
|
-
self.window.core.models.sort_items()
|
|
490
|
-
for id in self.window.core.models.get_ids():
|
|
491
|
-
if model_idx == idx:
|
|
492
|
-
return id
|
|
493
|
-
model_idx += 1
|
|
494
|
-
return None
|
|
472
|
+
return self.window.model_settings.get_model_id_by_row(idx)
|
|
495
473
|
|
|
496
474
|
def open_by_idx(self, idx: int):
|
|
497
475
|
"""
|
|
@@ -534,4 +512,4 @@ class Editor:
|
|
|
534
512
|
|
|
535
513
|
def clear_selected(self):
|
|
536
514
|
"""Clear selected list"""
|
|
537
|
-
self.selected = []
|
|
515
|
+
self.selected = []
|
|
@@ -56,10 +56,6 @@ class Common:
|
|
|
56
56
|
:param enabled: bool
|
|
57
57
|
"""
|
|
58
58
|
if enabled:
|
|
59
|
-
# keep UI color for compatibility
|
|
60
|
-
self.window.ui.nodes['painter.select.brush.color'].setCurrentText("Black")
|
|
61
|
-
self.window.ui.painter.set_brush_color(Qt.black)
|
|
62
|
-
# switch widget to brush mode (layered painting)
|
|
63
59
|
self.window.ui.painter.set_mode("brush")
|
|
64
60
|
self.window.core.config.set('painter.brush.mode', "brush")
|
|
65
61
|
self.window.core.config.save()
|
|
@@ -71,10 +67,6 @@ class Common:
|
|
|
71
67
|
:param enabled: bool
|
|
72
68
|
"""
|
|
73
69
|
if enabled:
|
|
74
|
-
# keep UI color for compatibility
|
|
75
|
-
self.window.ui.nodes['painter.select.brush.color'].setCurrentText("White")
|
|
76
|
-
self.window.ui.painter.set_brush_color(Qt.white)
|
|
77
|
-
# switch widget to erase mode (layered erasing)
|
|
78
70
|
self.window.ui.painter.set_mode("erase")
|
|
79
71
|
self.window.core.config.set('painter.brush.mode', "erase")
|
|
80
72
|
self.window.core.config.save()
|