pygpt-net 2.6.33__py3-none-any.whl → 2.6.36__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 +18 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/controller/assistant/batch.py +14 -4
- pygpt_net/controller/assistant/files.py +1 -0
- pygpt_net/controller/assistant/store.py +195 -1
- pygpt_net/controller/camera/camera.py +1 -1
- pygpt_net/controller/chat/common.py +58 -48
- pygpt_net/controller/chat/handler/stream_worker.py +55 -43
- pygpt_net/controller/config/placeholder.py +95 -75
- pygpt_net/controller/dialogs/confirm.py +3 -1
- pygpt_net/controller/media/media.py +11 -3
- pygpt_net/controller/painter/common.py +243 -13
- pygpt_net/controller/painter/painter.py +11 -2
- pygpt_net/core/assistants/files.py +18 -0
- pygpt_net/core/bridge/bridge.py +1 -5
- pygpt_net/core/bridge/context.py +81 -36
- pygpt_net/core/bridge/worker.py +3 -1
- pygpt_net/core/camera/camera.py +31 -402
- pygpt_net/core/camera/worker.py +430 -0
- pygpt_net/core/ctx/bag.py +4 -0
- pygpt_net/core/events/app.py +10 -17
- pygpt_net/core/events/base.py +17 -25
- pygpt_net/core/events/control.py +9 -17
- pygpt_net/core/events/event.py +9 -62
- pygpt_net/core/events/kernel.py +8 -17
- pygpt_net/core/events/realtime.py +8 -17
- pygpt_net/core/events/render.py +9 -17
- pygpt_net/core/filesystem/url.py +3 -0
- pygpt_net/core/render/web/body.py +483 -40
- pygpt_net/core/render/web/pid.py +39 -24
- pygpt_net/core/render/web/renderer.py +142 -36
- pygpt_net/core/text/utils.py +3 -0
- pygpt_net/data/config/config.json +4 -3
- pygpt_net/data/config/models.json +3 -3
- pygpt_net/data/config/settings.json +10 -5
- pygpt_net/data/css/web-blocks.css +4 -3
- pygpt_net/data/css/web-chatgpt.css +4 -2
- pygpt_net/data/css/web-chatgpt_wide.css +4 -2
- pygpt_net/data/locale/locale.de.ini +9 -7
- pygpt_net/data/locale/locale.en.ini +10 -6
- pygpt_net/data/locale/locale.es.ini +9 -7
- pygpt_net/data/locale/locale.fr.ini +9 -7
- pygpt_net/data/locale/locale.it.ini +9 -7
- pygpt_net/data/locale/locale.pl.ini +9 -7
- pygpt_net/data/locale/locale.uk.ini +9 -7
- pygpt_net/data/locale/locale.zh.ini +9 -7
- pygpt_net/item/assistant.py +13 -1
- pygpt_net/provider/api/google/__init__.py +46 -28
- pygpt_net/provider/api/openai/__init__.py +13 -10
- pygpt_net/provider/api/openai/store.py +45 -1
- pygpt_net/provider/core/config/patch.py +18 -0
- pygpt_net/provider/llms/google.py +4 -0
- pygpt_net/ui/dialog/assistant_store.py +213 -203
- pygpt_net/ui/layout/chat/input.py +3 -3
- pygpt_net/ui/layout/chat/painter.py +63 -4
- pygpt_net/ui/widget/draw/painter.py +715 -104
- pygpt_net/ui/widget/option/combo.py +5 -1
- pygpt_net/ui/widget/textarea/input.py +273 -3
- pygpt_net/ui/widget/textarea/web.py +2 -0
- {pygpt_net-2.6.33.dist-info → pygpt_net-2.6.36.dist-info}/METADATA +20 -2
- {pygpt_net-2.6.33.dist-info → pygpt_net-2.6.36.dist-info}/RECORD +64 -63
- {pygpt_net-2.6.33.dist-info → pygpt_net-2.6.36.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.33.dist-info → pygpt_net-2.6.36.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.33.dist-info → pygpt_net-2.6.36.dist-info}/entry_points.txt +0 -0
pygpt_net/core/events/kernel.py
CHANGED
|
@@ -6,16 +6,21 @@
|
|
|
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.04 00:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
|
-
from
|
|
12
|
+
from dataclasses import dataclass
|
|
13
|
+
from typing import Optional, ClassVar
|
|
13
14
|
|
|
14
15
|
from .base import BaseEvent
|
|
16
|
+
from ...item.ctx import CtxItem
|
|
15
17
|
|
|
16
18
|
|
|
19
|
+
@dataclass(slots=True)
|
|
17
20
|
class KernelEvent(BaseEvent):
|
|
18
21
|
"""Kernel events"""
|
|
22
|
+
# static id for event family
|
|
23
|
+
id: ClassVar[str] = "KernelEvent"
|
|
19
24
|
|
|
20
25
|
# core, events sent from kernel
|
|
21
26
|
INIT = "kernel.init"
|
|
@@ -55,18 +60,4 @@ class KernelEvent(BaseEvent):
|
|
|
55
60
|
STATUS = "kernel.status"
|
|
56
61
|
|
|
57
62
|
LIVE_APPEND = "kernel.live.append"
|
|
58
|
-
LIVE_CLEAR = "kernel.live.clear"
|
|
59
|
-
|
|
60
|
-
def __init__(
|
|
61
|
-
self,
|
|
62
|
-
name: Optional[str] = None,
|
|
63
|
-
data: Optional[dict] = None,
|
|
64
|
-
):
|
|
65
|
-
"""
|
|
66
|
-
Event object class
|
|
67
|
-
|
|
68
|
-
:param name: event name
|
|
69
|
-
:param data: event data
|
|
70
|
-
"""
|
|
71
|
-
super(KernelEvent, self).__init__(name, data)
|
|
72
|
-
self.id = "KernelEvent"
|
|
63
|
+
LIVE_CLEAR = "kernel.live.clear"
|
|
@@ -6,14 +6,17 @@
|
|
|
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.04 00:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
|
-
from
|
|
12
|
+
from dataclasses import dataclass
|
|
13
|
+
from typing import Optional, ClassVar
|
|
13
14
|
|
|
14
15
|
from .base import BaseEvent
|
|
16
|
+
from ...item.ctx import CtxItem
|
|
15
17
|
|
|
16
18
|
|
|
19
|
+
@dataclass(slots=True)
|
|
17
20
|
class RealtimeEvent(BaseEvent):
|
|
18
21
|
"""
|
|
19
22
|
Realtime events
|
|
@@ -26,6 +29,8 @@ class RealtimeEvent(BaseEvent):
|
|
|
26
29
|
- RT_OUTPUT_AUDIO_ERROR - audio output error (STREAM_ERROR)
|
|
27
30
|
- RT_OUTPUT_AUDIO_VOLUME_CHANGED - audio output volume changed (volume level)
|
|
28
31
|
"""
|
|
32
|
+
# static id for event family
|
|
33
|
+
id: ClassVar[str] = "RealtimeEvent"
|
|
29
34
|
|
|
30
35
|
# realtime events
|
|
31
36
|
RT_OUTPUT_AUDIO_DELTA = "rt.output.audio.delta"
|
|
@@ -38,18 +43,4 @@ class RealtimeEvent(BaseEvent):
|
|
|
38
43
|
RT_OUTPUT_TURN_END = "rt.output.turn.end"
|
|
39
44
|
RT_INPUT_AUDIO_DELTA = "rt.input.audio.delta"
|
|
40
45
|
RT_INPUT_AUDIO_MANUAL_START = "rt.input.audio.manual.start"
|
|
41
|
-
RT_INPUT_AUDIO_MANUAL_STOP = "rt.input.audio.manual.stop"
|
|
42
|
-
|
|
43
|
-
def __init__(
|
|
44
|
-
self,
|
|
45
|
-
name: Optional[str] = None,
|
|
46
|
-
data: Optional[dict] = None,
|
|
47
|
-
):
|
|
48
|
-
"""
|
|
49
|
-
Event object class
|
|
50
|
-
|
|
51
|
-
:param name: event name
|
|
52
|
-
:param data: event data
|
|
53
|
-
"""
|
|
54
|
-
super(RealtimeEvent, self).__init__(name, data)
|
|
55
|
-
self.id = "RealtimeEvent"
|
|
46
|
+
RT_INPUT_AUDIO_MANUAL_STOP = "rt.input.audio.manual.stop"
|
pygpt_net/core/events/render.py
CHANGED
|
@@ -6,16 +6,22 @@
|
|
|
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.04 00:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
|
-
from
|
|
12
|
+
from dataclasses import dataclass
|
|
13
|
+
from typing import Optional, ClassVar
|
|
13
14
|
|
|
14
15
|
from .base import BaseEvent
|
|
16
|
+
from ...item.ctx import CtxItem
|
|
15
17
|
|
|
16
18
|
|
|
19
|
+
@dataclass(slots=True)
|
|
17
20
|
class RenderEvent(BaseEvent):
|
|
18
21
|
"""Events used for rendering"""
|
|
22
|
+
# static id for event family
|
|
23
|
+
id: ClassVar[str] = "RenderEvent"
|
|
24
|
+
|
|
19
25
|
BEGIN = "render.begin"
|
|
20
26
|
END = "render.end"
|
|
21
27
|
FRESH = "render.fresh"
|
|
@@ -66,18 +72,4 @@ class RenderEvent(BaseEvent):
|
|
|
66
72
|
STATE_IDLE = "render.state.idle"
|
|
67
73
|
|
|
68
74
|
LIVE_APPEND = "render.live.append"
|
|
69
|
-
LIVE_CLEAR = "render.live.clear"
|
|
70
|
-
|
|
71
|
-
def __init__(
|
|
72
|
-
self,
|
|
73
|
-
name: Optional[str] = None,
|
|
74
|
-
data: Optional[dict] = None,
|
|
75
|
-
):
|
|
76
|
-
"""
|
|
77
|
-
Event object class
|
|
78
|
-
|
|
79
|
-
:param name: event name
|
|
80
|
-
:param data: event data
|
|
81
|
-
"""
|
|
82
|
-
super(RenderEvent, self).__init__(name, data)
|
|
83
|
-
self.id = "RenderEvent"
|
|
75
|
+
LIVE_CLEAR = "render.live.clear"
|
pygpt_net/core/filesystem/url.py
CHANGED
|
@@ -44,6 +44,9 @@ class Url:
|
|
|
44
44
|
if pid in self.window.ui.nodes['output']:
|
|
45
45
|
self.window.ui.nodes['output'][pid].on_focus_js()
|
|
46
46
|
return
|
|
47
|
+
elif url.toString().startswith('bridge://play_video/'):
|
|
48
|
+
self.window.controller.media.play_video(url.toString().replace("bridge://play_video/", ""))
|
|
49
|
+
return
|
|
47
50
|
|
|
48
51
|
# -------------
|
|
49
52
|
extra_schemes = (
|