pygpt-net 2.6.29__py3-none-any.whl → 2.6.30__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 +7 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/{container.py → app_core.py} +5 -6
- pygpt_net/controller/access/control.py +1 -9
- pygpt_net/controller/assistant/assistant.py +4 -4
- pygpt_net/controller/assistant/batch.py +7 -7
- pygpt_net/controller/assistant/files.py +4 -4
- pygpt_net/controller/assistant/threads.py +3 -3
- pygpt_net/controller/attachment/attachment.py +4 -7
- pygpt_net/controller/chat/common.py +1 -1
- pygpt_net/controller/chat/stream.py +961 -294
- pygpt_net/controller/chat/vision.py +11 -19
- pygpt_net/controller/config/placeholder.py +1 -1
- pygpt_net/controller/ctx/ctx.py +1 -1
- pygpt_net/controller/ctx/summarizer.py +1 -1
- pygpt_net/controller/mode/mode.py +21 -12
- pygpt_net/controller/plugins/settings.py +3 -2
- pygpt_net/controller/presets/editor.py +112 -99
- pygpt_net/controller/theme/theme.py +3 -2
- pygpt_net/controller/ui/vision.py +4 -4
- pygpt_net/core/agents/legacy.py +2 -2
- pygpt_net/core/agents/runners/openai_workflow.py +2 -2
- pygpt_net/core/assistants/files.py +5 -5
- pygpt_net/core/assistants/store.py +4 -4
- pygpt_net/core/bridge/bridge.py +3 -3
- pygpt_net/core/bridge/worker.py +28 -9
- pygpt_net/core/debug/console/console.py +2 -2
- pygpt_net/core/debug/presets.py +2 -2
- pygpt_net/core/experts/experts.py +2 -2
- pygpt_net/core/modes/modes.py +2 -2
- pygpt_net/core/presets/presets.py +3 -3
- pygpt_net/core/tokens/tokens.py +4 -4
- pygpt_net/core/types/mode.py +5 -2
- pygpt_net/core/vision/analyzer.py +1 -1
- pygpt_net/data/config/config.json +6 -3
- pygpt_net/data/config/models.json +75 -3
- pygpt_net/data/config/modes.json +3 -9
- pygpt_net/data/config/settings.json +89 -31
- pygpt_net/data/config/settings_section.json +2 -2
- pygpt_net/data/locale/locale.de.ini +2 -2
- pygpt_net/data/locale/locale.en.ini +9 -2
- pygpt_net/data/locale/locale.es.ini +2 -2
- pygpt_net/data/locale/locale.fr.ini +2 -2
- pygpt_net/data/locale/locale.it.ini +2 -2
- pygpt_net/data/locale/locale.pl.ini +3 -3
- pygpt_net/data/locale/locale.uk.ini +2 -2
- pygpt_net/data/locale/locale.zh.ini +2 -2
- pygpt_net/item/model.py +23 -3
- pygpt_net/plugin/openai_dalle/plugin.py +4 -4
- pygpt_net/plugin/openai_vision/plugin.py +12 -13
- pygpt_net/provider/agents/openai/agent.py +5 -5
- pygpt_net/provider/agents/openai/agent_b2b.py +5 -5
- pygpt_net/provider/agents/openai/agent_planner.py +5 -6
- pygpt_net/provider/agents/openai/agent_with_experts.py +5 -5
- pygpt_net/provider/agents/openai/agent_with_experts_feedback.py +4 -4
- pygpt_net/provider/agents/openai/agent_with_feedback.py +4 -4
- pygpt_net/provider/agents/openai/bot_researcher.py +2 -2
- pygpt_net/provider/agents/openai/bots/research_bot/agents/planner_agent.py +1 -1
- pygpt_net/provider/agents/openai/bots/research_bot/agents/search_agent.py +1 -1
- pygpt_net/provider/agents/openai/bots/research_bot/agents/writer_agent.py +1 -1
- pygpt_net/provider/agents/openai/evolve.py +5 -5
- pygpt_net/provider/agents/openai/supervisor.py +4 -4
- pygpt_net/provider/api/__init__.py +27 -0
- pygpt_net/provider/api/anthropic/__init__.py +68 -0
- pygpt_net/provider/api/google/__init__.py +262 -0
- pygpt_net/provider/api/google/audio.py +114 -0
- pygpt_net/provider/api/google/chat.py +552 -0
- pygpt_net/provider/api/google/image.py +287 -0
- pygpt_net/provider/api/google/tools.py +222 -0
- pygpt_net/provider/api/google/vision.py +129 -0
- pygpt_net/provider/{gpt → api/openai}/__init__.py +2 -2
- pygpt_net/provider/{gpt → api/openai}/agents/computer.py +1 -1
- pygpt_net/provider/{gpt → api/openai}/agents/experts.py +1 -1
- pygpt_net/provider/{gpt → api/openai}/agents/response.py +1 -1
- pygpt_net/provider/{gpt → api/openai}/assistants.py +1 -1
- pygpt_net/provider/{gpt → api/openai}/chat.py +15 -8
- pygpt_net/provider/{gpt → api/openai}/completion.py +1 -1
- pygpt_net/provider/{gpt → api/openai}/image.py +1 -1
- pygpt_net/provider/{gpt → api/openai}/remote_tools.py +1 -1
- pygpt_net/provider/{gpt → api/openai}/responses.py +34 -20
- pygpt_net/provider/{gpt → api/openai}/store.py +2 -2
- pygpt_net/provider/{gpt → api/openai}/vision.py +1 -1
- pygpt_net/provider/{gpt → api/openai}/worker/assistants.py +4 -4
- pygpt_net/provider/{gpt → api/openai}/worker/importer.py +10 -10
- pygpt_net/provider/audio_input/openai_whisper.py +1 -1
- pygpt_net/provider/audio_output/google_tts.py +12 -0
- pygpt_net/provider/audio_output/openai_tts.py +1 -1
- pygpt_net/provider/core/config/patch.py +11 -0
- pygpt_net/provider/core/model/patch.py +9 -0
- pygpt_net/provider/core/preset/json_file.py +2 -4
- pygpt_net/provider/llms/anthropic.py +2 -5
- pygpt_net/provider/llms/base.py +4 -3
- pygpt_net/provider/llms/openai.py +1 -1
- pygpt_net/provider/loaders/hub/image_vision/base.py +1 -1
- pygpt_net/ui/dialog/preset.py +71 -55
- pygpt_net/ui/main.py +6 -4
- pygpt_net/utils.py +9 -0
- {pygpt_net-2.6.29.dist-info → pygpt_net-2.6.30.dist-info}/METADATA +32 -44
- {pygpt_net-2.6.29.dist-info → pygpt_net-2.6.30.dist-info}/RECORD +113 -105
- /pygpt_net/provider/{gpt → api/openai}/agents/__init__.py +0 -0
- /pygpt_net/provider/{gpt → api/openai}/agents/client.py +0 -0
- /pygpt_net/provider/{gpt → api/openai}/agents/remote_tools.py +0 -0
- /pygpt_net/provider/{gpt → api/openai}/agents/utils.py +0 -0
- /pygpt_net/provider/{gpt → api/openai}/audio.py +0 -0
- /pygpt_net/provider/{gpt → api/openai}/computer.py +0 -0
- /pygpt_net/provider/{gpt → api/openai}/container.py +0 -0
- /pygpt_net/provider/{gpt → api/openai}/summarizer.py +0 -0
- /pygpt_net/provider/{gpt → api/openai}/tools.py +0 -0
- /pygpt_net/provider/{gpt → api/openai}/utils.py +0 -0
- /pygpt_net/provider/{gpt → api/openai}/worker/__init__.py +0 -0
- {pygpt_net-2.6.29.dist-info → pygpt_net-2.6.30.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.29.dist-info → pygpt_net-2.6.30.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.29.dist-info → pygpt_net-2.6.30.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: 2025.
|
|
9
|
+
# Updated Date: 2025.08.28 20:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
from pygpt_net.core.types import (
|
|
@@ -18,7 +18,8 @@ from pygpt_net.core.types import (
|
|
|
18
18
|
MODE_LANGCHAIN,
|
|
19
19
|
MODE_LLAMA_INDEX,
|
|
20
20
|
MODE_VISION,
|
|
21
|
-
MODE_RESEARCH,
|
|
21
|
+
MODE_RESEARCH,
|
|
22
|
+
MULTIMODAL_IMAGE,
|
|
22
23
|
)
|
|
23
24
|
|
|
24
25
|
class Vision:
|
|
@@ -64,20 +65,21 @@ class Vision:
|
|
|
64
65
|
|
|
65
66
|
def switch_to_vision(self):
|
|
66
67
|
"""Switch to vision mode"""
|
|
68
|
+
return # DO NOT SWITCH, deprecated
|
|
67
69
|
mode = self.window.core.config.get('mode')
|
|
68
70
|
model = self.window.core.config.get('model')
|
|
69
71
|
model_data = self.window.core.models.get(model)
|
|
70
72
|
if mode in [MODE_AGENT, MODE_AGENT_LLAMA, MODE_AGENT_OPENAI]:
|
|
71
73
|
return # disallow change in agent modes
|
|
72
|
-
if mode == MODE_CHAT and
|
|
74
|
+
if mode == MODE_CHAT and MODE_CHAT in model_data.mode:
|
|
73
75
|
return # abort if vision is already allowed
|
|
74
|
-
if mode == MODE_VISION:
|
|
75
|
-
return
|
|
76
|
+
# if mode == MODE_VISION:
|
|
77
|
+
# return
|
|
76
78
|
# abort if vision is already enabled
|
|
77
79
|
if not self.window.controller.plugins.is_enabled('openai_vision') \
|
|
78
80
|
or (self.window.controller.plugins.is_enabled('openai_vision')
|
|
79
81
|
and mode not in self.allowed_modes):
|
|
80
|
-
self.window.controller.mode.set(
|
|
82
|
+
self.window.controller.mode.set(MODE_CHAT)
|
|
81
83
|
|
|
82
84
|
def allowed(self) -> bool:
|
|
83
85
|
"""
|
|
@@ -85,10 +87,7 @@ class Vision:
|
|
|
85
87
|
|
|
86
88
|
:return: True if allowed
|
|
87
89
|
"""
|
|
88
|
-
|
|
89
|
-
or self.window.core.config.get('mode') in self.allowed_modes:
|
|
90
|
-
return True
|
|
91
|
-
return False
|
|
90
|
+
return self.window.controller.plugins.is_enabled('openai_vision') or self.is_vision_model()
|
|
92
91
|
|
|
93
92
|
def is_vision_model(self) -> bool:
|
|
94
93
|
"""
|
|
@@ -96,17 +95,10 @@ class Vision:
|
|
|
96
95
|
|
|
97
96
|
:return: True if vision model
|
|
98
97
|
"""
|
|
99
|
-
allowed_modes = [
|
|
100
|
-
MODE_CHAT,
|
|
101
|
-
MODE_COMPLETION,
|
|
102
|
-
MODE_LANGCHAIN,
|
|
103
|
-
MODE_LLAMA_INDEX,
|
|
104
|
-
MODE_RESEARCH,
|
|
105
|
-
]
|
|
106
98
|
mode = self.window.core.config.get('mode')
|
|
107
99
|
model = self.window.core.config.get('model')
|
|
108
100
|
model_data = self.window.core.models.get(model)
|
|
109
|
-
if
|
|
110
|
-
return
|
|
101
|
+
if model_data:
|
|
102
|
+
return model_data.is_image_input() and mode in self.allowed_modes
|
|
111
103
|
return False
|
|
112
104
|
|
|
@@ -219,7 +219,7 @@ class Placeholder:
|
|
|
219
219
|
|
|
220
220
|
:return: placeholders list
|
|
221
221
|
"""
|
|
222
|
-
return self.window.core.
|
|
222
|
+
return self.window.core.api.openai.remote_tools.get_choices()
|
|
223
223
|
|
|
224
224
|
def get_llama_index_chat_modes(self) -> List[Dict[str, str]]:
|
|
225
225
|
"""
|
pygpt_net/controller/ctx/ctx.py
CHANGED
|
@@ -59,7 +59,7 @@ class Summarizer:
|
|
|
59
59
|
:param window: Window instance
|
|
60
60
|
:param updated_signal: WorkerSignals: updated signal
|
|
61
61
|
"""
|
|
62
|
-
title = window.core.
|
|
62
|
+
title = window.core.api.openai.summarizer.summary_ctx(ctx)
|
|
63
63
|
if title:
|
|
64
64
|
updated_signal.emit(id, ctx, title)
|
|
65
65
|
updated_signal.disconnect()
|
|
@@ -6,10 +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.08.
|
|
9
|
+
# Updated Date: 2025.08.28 09:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
from pygpt_net.core.events import Event, AppEvent
|
|
13
|
+
from pygpt_net.core.types import (
|
|
14
|
+
MODE_ASSISTANT,
|
|
15
|
+
MODE_CHAT,
|
|
16
|
+
)
|
|
13
17
|
from pygpt_net.item.ctx import CtxItem
|
|
14
18
|
from pygpt_net.utils import trans
|
|
15
19
|
|
|
@@ -26,25 +30,33 @@ class Mode:
|
|
|
26
30
|
|
|
27
31
|
@staticmethod
|
|
28
32
|
def _normalize_mode(mode: str) -> str:
|
|
33
|
+
"""
|
|
34
|
+
Normalize mode name (handle deprecated modes)
|
|
35
|
+
|
|
36
|
+
:param mode: mode name
|
|
37
|
+
:return: normalized mode name
|
|
38
|
+
"""
|
|
29
39
|
if mode == "langchain":
|
|
30
40
|
print("Langchain mode is deprecated from v2.5.20 and no longer supported. "
|
|
31
41
|
"Please use LlamaIndex or Chat mode instead.")
|
|
32
|
-
return
|
|
42
|
+
return MODE_CHAT
|
|
43
|
+
elif mode == "vision":
|
|
44
|
+
print("Vision mode is deprecated from v2.6.30 and no longer supported. "
|
|
45
|
+
"Please use Chat mode with multimodal models instead.")
|
|
46
|
+
return MODE_CHAT
|
|
33
47
|
return mode
|
|
34
48
|
|
|
35
49
|
def select(self, mode: str):
|
|
36
50
|
"""
|
|
37
51
|
Select mode by id
|
|
38
52
|
|
|
39
|
-
:param mode
|
|
53
|
+
:param mode: mode to select
|
|
40
54
|
"""
|
|
41
55
|
mode = self._normalize_mode(mode)
|
|
42
|
-
|
|
43
|
-
# check if mode change is not locked
|
|
44
56
|
if self.change_locked() or mode is None:
|
|
45
|
-
return
|
|
46
|
-
self.set(mode)
|
|
57
|
+
return # abort if mode is locked
|
|
47
58
|
|
|
59
|
+
self.set(mode)
|
|
48
60
|
event = Event(Event.MODE_SELECT, {
|
|
49
61
|
'value': mode,
|
|
50
62
|
})
|
|
@@ -70,7 +82,7 @@ class Mode:
|
|
|
70
82
|
core = w.core
|
|
71
83
|
cfg = core.config
|
|
72
84
|
try:
|
|
73
|
-
if mode ==
|
|
85
|
+
if mode == MODE_ASSISTANT:
|
|
74
86
|
c.presets.select_default()
|
|
75
87
|
core_ctx = core.ctx
|
|
76
88
|
current = core_ctx.get_current()
|
|
@@ -172,9 +184,7 @@ class Mode:
|
|
|
172
184
|
*args,
|
|
173
185
|
**kwargs
|
|
174
186
|
):
|
|
175
|
-
"""
|
|
176
|
-
Hook: on update current temperature global field
|
|
177
|
-
"""
|
|
187
|
+
"""Hook: on update current temperature global field"""
|
|
178
188
|
if caller != "slider":
|
|
179
189
|
return # accept call only from slider (has already validated min/max)
|
|
180
190
|
|
|
@@ -240,6 +250,5 @@ class Mode:
|
|
|
240
250
|
Check if mode change is locked
|
|
241
251
|
|
|
242
252
|
:return: True if locked
|
|
243
|
-
:rtype: bool
|
|
244
253
|
"""
|
|
245
254
|
return bool(self.window.controller.chat.input.generating)
|
|
@@ -14,7 +14,7 @@ from typing import Any
|
|
|
14
14
|
from PySide6.QtWidgets import QApplication
|
|
15
15
|
|
|
16
16
|
from pygpt_net.core.events import Event, KernelEvent
|
|
17
|
-
from pygpt_net.utils import trans
|
|
17
|
+
from pygpt_net.utils import trans, freeze_updates
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class Settings:
|
|
@@ -52,7 +52,8 @@ class Settings:
|
|
|
52
52
|
'status': trans("status.loading")
|
|
53
53
|
}))
|
|
54
54
|
QApplication.processEvents()
|
|
55
|
-
self.
|
|
55
|
+
with freeze_updates(self.window):
|
|
56
|
+
self.setup()
|
|
56
57
|
self.config_initialized = True
|
|
57
58
|
if self.config_dialog:
|
|
58
59
|
return
|