pygpt-net 2.6.33__py3-none-any.whl → 2.6.35__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 (64) hide show
  1. pygpt_net/CHANGELOG.txt +14 -0
  2. pygpt_net/__init__.py +3 -3
  3. pygpt_net/controller/assistant/batch.py +14 -4
  4. pygpt_net/controller/assistant/files.py +1 -0
  5. pygpt_net/controller/assistant/store.py +195 -1
  6. pygpt_net/controller/camera/camera.py +1 -1
  7. pygpt_net/controller/chat/common.py +58 -48
  8. pygpt_net/controller/chat/handler/stream_worker.py +55 -43
  9. pygpt_net/controller/config/placeholder.py +95 -75
  10. pygpt_net/controller/dialogs/confirm.py +3 -1
  11. pygpt_net/controller/media/media.py +11 -3
  12. pygpt_net/controller/painter/common.py +243 -13
  13. pygpt_net/controller/painter/painter.py +11 -2
  14. pygpt_net/core/assistants/files.py +18 -0
  15. pygpt_net/core/bridge/bridge.py +1 -5
  16. pygpt_net/core/bridge/context.py +81 -36
  17. pygpt_net/core/bridge/worker.py +3 -1
  18. pygpt_net/core/camera/camera.py +31 -402
  19. pygpt_net/core/camera/worker.py +430 -0
  20. pygpt_net/core/ctx/bag.py +4 -0
  21. pygpt_net/core/events/app.py +10 -17
  22. pygpt_net/core/events/base.py +17 -25
  23. pygpt_net/core/events/control.py +9 -17
  24. pygpt_net/core/events/event.py +9 -62
  25. pygpt_net/core/events/kernel.py +8 -17
  26. pygpt_net/core/events/realtime.py +8 -17
  27. pygpt_net/core/events/render.py +9 -17
  28. pygpt_net/core/filesystem/url.py +3 -0
  29. pygpt_net/core/render/web/body.py +454 -40
  30. pygpt_net/core/render/web/pid.py +39 -24
  31. pygpt_net/core/render/web/renderer.py +146 -40
  32. pygpt_net/core/text/utils.py +3 -0
  33. pygpt_net/data/config/config.json +4 -3
  34. pygpt_net/data/config/models.json +3 -3
  35. pygpt_net/data/config/settings.json +10 -5
  36. pygpt_net/data/css/web-blocks.css +3 -2
  37. pygpt_net/data/css/web-chatgpt.css +3 -1
  38. pygpt_net/data/css/web-chatgpt_wide.css +3 -1
  39. pygpt_net/data/locale/locale.de.ini +9 -7
  40. pygpt_net/data/locale/locale.en.ini +10 -6
  41. pygpt_net/data/locale/locale.es.ini +9 -7
  42. pygpt_net/data/locale/locale.fr.ini +9 -7
  43. pygpt_net/data/locale/locale.it.ini +9 -7
  44. pygpt_net/data/locale/locale.pl.ini +9 -7
  45. pygpt_net/data/locale/locale.uk.ini +9 -7
  46. pygpt_net/data/locale/locale.zh.ini +9 -7
  47. pygpt_net/item/assistant.py +13 -1
  48. pygpt_net/provider/api/google/__init__.py +46 -28
  49. pygpt_net/provider/api/openai/__init__.py +13 -10
  50. pygpt_net/provider/api/openai/store.py +45 -1
  51. pygpt_net/provider/core/config/patch.py +9 -0
  52. pygpt_net/provider/llms/google.py +4 -0
  53. pygpt_net/ui/dialog/assistant_store.py +213 -203
  54. pygpt_net/ui/layout/chat/input.py +3 -3
  55. pygpt_net/ui/layout/chat/painter.py +63 -4
  56. pygpt_net/ui/widget/draw/painter.py +715 -104
  57. pygpt_net/ui/widget/option/combo.py +5 -1
  58. pygpt_net/ui/widget/textarea/input.py +273 -3
  59. pygpt_net/ui/widget/textarea/web.py +2 -0
  60. {pygpt_net-2.6.33.dist-info → pygpt_net-2.6.35.dist-info}/METADATA +16 -2
  61. {pygpt_net-2.6.33.dist-info → pygpt_net-2.6.35.dist-info}/RECORD +64 -63
  62. {pygpt_net-2.6.33.dist-info → pygpt_net-2.6.35.dist-info}/LICENSE +0 -0
  63. {pygpt_net-2.6.33.dist-info → pygpt_net-2.6.35.dist-info}/WHEEL +0 -0
  64. {pygpt_net-2.6.33.dist-info → pygpt_net-2.6.35.dist-info}/entry_points.txt +0 -0
@@ -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.08.23 21:00:00 #
9
+ # Updated Date: 2025.09.04 00:00:00 #
10
10
  # ================================================== #
11
11
 
12
- from typing import Optional
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.08.30 06:00:00 #
9
+ # Updated Date: 2025.09.04 00:00:00 #
10
10
  # ================================================== #
11
11
 
12
- from typing import Optional
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"
@@ -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.08.23 21:00:00 #
9
+ # Updated Date: 2025.09.04 00:00:00 #
10
10
  # ================================================== #
11
11
 
12
- from typing import Optional
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"
@@ -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 = (