pygpt-net 2.7.4__py3-none-any.whl → 2.7.6__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 (159) hide show
  1. pygpt_net/CHANGELOG.txt +15 -0
  2. pygpt_net/__init__.py +4 -4
  3. pygpt_net/app_core.py +4 -2
  4. pygpt_net/controller/__init__.py +5 -1
  5. pygpt_net/controller/assistant/assistant.py +1 -4
  6. pygpt_net/controller/assistant/batch.py +5 -504
  7. pygpt_net/controller/assistant/editor.py +5 -5
  8. pygpt_net/controller/assistant/files.py +16 -16
  9. pygpt_net/controller/chat/handler/google_stream.py +307 -1
  10. pygpt_net/controller/chat/handler/worker.py +10 -25
  11. pygpt_net/controller/chat/handler/xai_stream.py +621 -52
  12. pygpt_net/controller/chat/image.py +2 -2
  13. pygpt_net/controller/debug/fixtures.py +3 -2
  14. pygpt_net/controller/dialogs/confirm.py +73 -101
  15. pygpt_net/controller/files/files.py +65 -4
  16. pygpt_net/controller/lang/mapping.py +9 -9
  17. pygpt_net/controller/painter/capture.py +50 -1
  18. pygpt_net/controller/presets/presets.py +2 -1
  19. pygpt_net/controller/remote_store/__init__.py +12 -0
  20. pygpt_net/{provider/core/assistant_file/db_sqlite → controller/remote_store/google}/__init__.py +2 -2
  21. pygpt_net/controller/remote_store/google/batch.py +402 -0
  22. pygpt_net/controller/remote_store/google/store.py +615 -0
  23. pygpt_net/controller/remote_store/openai/__init__.py +12 -0
  24. pygpt_net/controller/remote_store/openai/batch.py +524 -0
  25. pygpt_net/controller/{assistant → remote_store/openai}/store.py +63 -60
  26. pygpt_net/controller/remote_store/remote_store.py +35 -0
  27. pygpt_net/controller/ui/ui.py +20 -1
  28. pygpt_net/core/assistants/assistants.py +3 -15
  29. pygpt_net/core/db/database.py +5 -3
  30. pygpt_net/core/filesystem/url.py +4 -1
  31. pygpt_net/core/locale/placeholder.py +35 -0
  32. pygpt_net/core/remote_store/__init__.py +12 -0
  33. pygpt_net/core/remote_store/google/__init__.py +11 -0
  34. pygpt_net/core/remote_store/google/files.py +224 -0
  35. pygpt_net/core/remote_store/google/store.py +248 -0
  36. pygpt_net/core/remote_store/openai/__init__.py +11 -0
  37. pygpt_net/core/{assistants → remote_store/openai}/files.py +26 -19
  38. pygpt_net/core/{assistants → remote_store/openai}/store.py +32 -15
  39. pygpt_net/core/remote_store/remote_store.py +24 -0
  40. pygpt_net/core/render/web/body.py +3 -2
  41. pygpt_net/core/types/chunk.py +27 -0
  42. pygpt_net/data/config/config.json +8 -4
  43. pygpt_net/data/config/models.json +77 -3
  44. pygpt_net/data/config/settings.json +45 -0
  45. pygpt_net/data/js/app/template.js +1 -1
  46. pygpt_net/data/js/app.min.js +2 -2
  47. pygpt_net/data/locale/locale.de.ini +44 -41
  48. pygpt_net/data/locale/locale.en.ini +56 -43
  49. pygpt_net/data/locale/locale.es.ini +44 -41
  50. pygpt_net/data/locale/locale.fr.ini +44 -41
  51. pygpt_net/data/locale/locale.it.ini +44 -41
  52. pygpt_net/data/locale/locale.pl.ini +45 -42
  53. pygpt_net/data/locale/locale.uk.ini +44 -41
  54. pygpt_net/data/locale/locale.zh.ini +44 -41
  55. pygpt_net/data/locale/plugin.cmd_history.de.ini +1 -1
  56. pygpt_net/data/locale/plugin.cmd_history.en.ini +1 -1
  57. pygpt_net/data/locale/plugin.cmd_history.es.ini +1 -1
  58. pygpt_net/data/locale/plugin.cmd_history.fr.ini +1 -1
  59. pygpt_net/data/locale/plugin.cmd_history.it.ini +1 -1
  60. pygpt_net/data/locale/plugin.cmd_history.pl.ini +1 -1
  61. pygpt_net/data/locale/plugin.cmd_history.uk.ini +1 -1
  62. pygpt_net/data/locale/plugin.cmd_history.zh.ini +1 -1
  63. pygpt_net/data/locale/plugin.cmd_mouse_control.en.ini +14 -0
  64. pygpt_net/data/locale/plugin.cmd_web.de.ini +1 -1
  65. pygpt_net/data/locale/plugin.cmd_web.en.ini +1 -1
  66. pygpt_net/data/locale/plugin.cmd_web.es.ini +1 -1
  67. pygpt_net/data/locale/plugin.cmd_web.fr.ini +1 -1
  68. pygpt_net/data/locale/plugin.cmd_web.it.ini +1 -1
  69. pygpt_net/data/locale/plugin.cmd_web.pl.ini +1 -1
  70. pygpt_net/data/locale/plugin.cmd_web.uk.ini +1 -1
  71. pygpt_net/data/locale/plugin.cmd_web.zh.ini +1 -1
  72. pygpt_net/data/locale/plugin.idx_llama_index.de.ini +2 -2
  73. pygpt_net/data/locale/plugin.idx_llama_index.en.ini +2 -2
  74. pygpt_net/data/locale/plugin.idx_llama_index.es.ini +2 -2
  75. pygpt_net/data/locale/plugin.idx_llama_index.fr.ini +2 -2
  76. pygpt_net/data/locale/plugin.idx_llama_index.it.ini +2 -2
  77. pygpt_net/data/locale/plugin.idx_llama_index.pl.ini +2 -2
  78. pygpt_net/data/locale/plugin.idx_llama_index.uk.ini +2 -2
  79. pygpt_net/data/locale/plugin.idx_llama_index.zh.ini +2 -2
  80. pygpt_net/item/assistant.py +1 -211
  81. pygpt_net/item/ctx.py +3 -3
  82. pygpt_net/item/store.py +238 -0
  83. pygpt_net/js_rc.py +2449 -2447
  84. pygpt_net/migrations/Version20260102190000.py +35 -0
  85. pygpt_net/migrations/__init__.py +3 -1
  86. pygpt_net/plugin/cmd_mouse_control/config.py +471 -1
  87. pygpt_net/plugin/cmd_mouse_control/plugin.py +487 -22
  88. pygpt_net/plugin/cmd_mouse_control/worker.py +464 -87
  89. pygpt_net/plugin/cmd_mouse_control/worker_sandbox.py +729 -0
  90. pygpt_net/plugin/idx_llama_index/config.py +2 -2
  91. pygpt_net/provider/api/anthropic/__init__.py +10 -8
  92. pygpt_net/provider/api/google/__init__.py +21 -58
  93. pygpt_net/provider/api/google/chat.py +545 -129
  94. pygpt_net/provider/api/google/computer.py +190 -0
  95. pygpt_net/provider/api/google/realtime/realtime.py +2 -2
  96. pygpt_net/provider/api/google/remote_tools.py +93 -0
  97. pygpt_net/provider/api/google/store.py +546 -0
  98. pygpt_net/provider/api/google/worker/__init__.py +0 -0
  99. pygpt_net/provider/api/google/worker/importer.py +392 -0
  100. pygpt_net/provider/api/openai/__init__.py +7 -3
  101. pygpt_net/provider/api/openai/computer.py +10 -1
  102. pygpt_net/provider/api/openai/responses.py +0 -0
  103. pygpt_net/provider/api/openai/store.py +6 -6
  104. pygpt_net/provider/api/openai/worker/importer.py +24 -24
  105. pygpt_net/provider/api/x_ai/__init__.py +10 -9
  106. pygpt_net/provider/api/x_ai/chat.py +272 -102
  107. pygpt_net/provider/core/config/patch.py +16 -1
  108. pygpt_net/provider/core/config/patches/patch_before_2_6_42.py +3 -3
  109. pygpt_net/provider/core/model/patch.py +17 -3
  110. pygpt_net/provider/core/preset/json_file.py +13 -7
  111. pygpt_net/provider/core/{assistant_file → remote_file}/__init__.py +1 -1
  112. pygpt_net/provider/core/{assistant_file → remote_file}/base.py +9 -9
  113. pygpt_net/provider/core/remote_file/db_sqlite/__init__.py +12 -0
  114. pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/patch.py +1 -1
  115. pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/provider.py +23 -20
  116. pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/storage.py +35 -27
  117. pygpt_net/provider/core/{assistant_file → remote_file}/db_sqlite/utils.py +5 -4
  118. pygpt_net/provider/core/{assistant_store → remote_store}/__init__.py +1 -1
  119. pygpt_net/provider/core/{assistant_store → remote_store}/base.py +10 -10
  120. pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/__init__.py +1 -1
  121. pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/patch.py +1 -1
  122. pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/provider.py +16 -15
  123. pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/storage.py +30 -23
  124. pygpt_net/provider/core/{assistant_store → remote_store}/db_sqlite/utils.py +5 -4
  125. pygpt_net/provider/core/{assistant_store → remote_store}/json_file.py +9 -9
  126. pygpt_net/provider/llms/google.py +2 -2
  127. pygpt_net/tools/image_viewer/ui/dialogs.py +298 -12
  128. pygpt_net/tools/text_editor/ui/widgets.py +5 -1
  129. pygpt_net/ui/base/config_dialog.py +3 -2
  130. pygpt_net/ui/base/context_menu.py +44 -1
  131. pygpt_net/ui/dialog/assistant.py +3 -3
  132. pygpt_net/ui/dialog/plugins.py +3 -1
  133. pygpt_net/ui/dialog/remote_store_google.py +539 -0
  134. pygpt_net/ui/dialog/{assistant_store.py → remote_store_openai.py} +95 -95
  135. pygpt_net/ui/dialogs.py +5 -3
  136. pygpt_net/ui/layout/chat/attachments_uploaded.py +3 -3
  137. pygpt_net/ui/layout/toolbox/computer_env.py +26 -8
  138. pygpt_net/ui/layout/toolbox/indexes.py +22 -19
  139. pygpt_net/ui/layout/toolbox/model.py +28 -5
  140. pygpt_net/ui/menu/tools.py +13 -5
  141. pygpt_net/ui/widget/dialog/remote_store_google.py +56 -0
  142. pygpt_net/ui/widget/dialog/{assistant_store.py → remote_store_openai.py} +9 -9
  143. pygpt_net/ui/widget/element/button.py +4 -4
  144. pygpt_net/ui/widget/image/display.py +25 -8
  145. pygpt_net/ui/widget/lists/remote_store_google.py +248 -0
  146. pygpt_net/ui/widget/lists/{assistant_store.py → remote_store_openai.py} +21 -21
  147. pygpt_net/ui/widget/option/checkbox_list.py +47 -9
  148. pygpt_net/ui/widget/option/combo.py +39 -3
  149. pygpt_net/ui/widget/tabs/output.py +9 -1
  150. pygpt_net/ui/widget/textarea/editor.py +14 -1
  151. pygpt_net/ui/widget/textarea/input.py +20 -7
  152. pygpt_net/ui/widget/textarea/notepad.py +24 -1
  153. pygpt_net/ui/widget/textarea/output.py +23 -1
  154. pygpt_net/ui/widget/textarea/web.py +16 -1
  155. {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.6.dist-info}/METADATA +41 -2
  156. {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.6.dist-info}/RECORD +158 -132
  157. {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.6.dist-info}/LICENSE +0 -0
  158. {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.6.dist-info}/WHEEL +0 -0
  159. {pygpt_net-2.7.4.dist-info → pygpt_net-2.7.6.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.12.14 22:00:00 #
9
+ # Updated Date: 2026.01.02 20:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from .provider import *
@@ -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.04.26 23:00:00 #
9
+ # Updated Date: 2026.01.02 20:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from packaging.version import parse as parse_version, Version
@@ -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.12.14 22:00:00 #
9
+ # Updated Date: 2026.01.02 20:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import uuid
@@ -14,8 +14,8 @@ from typing import Dict
14
14
 
15
15
  from packaging.version import Version
16
16
 
17
- from pygpt_net.item.assistant import AssistantStoreItem
18
- from pygpt_net.provider.core.assistant_store.base import BaseProvider
17
+ from pygpt_net.item.store import RemoteStoreItem
18
+ from pygpt_net.provider.core.remote_store.base import BaseProvider
19
19
 
20
20
  from .patch import Patch
21
21
  from .storage import Storage
@@ -28,7 +28,7 @@ class DbSqliteProvider(BaseProvider):
28
28
  self.patcher = Patch(window, self)
29
29
  self.storage = Storage(window)
30
30
  self.id = "db_sqlite"
31
- self.type = "assistant_store"
31
+ self.type = "remote_store"
32
32
 
33
33
  def attach(self, window):
34
34
  self.window = window
@@ -51,11 +51,11 @@ class DbSqliteProvider(BaseProvider):
51
51
  """
52
52
  return str(uuid.uuid4())
53
53
 
54
- def create(self, store: AssistantStoreItem) -> int:
54
+ def create(self, store: RemoteStoreItem) -> int:
55
55
  """
56
56
  Create new and return its ID
57
57
 
58
- :param store: AssistantStoreItem
58
+ :param store: RemoteStoreItem
59
59
  :return: store ID
60
60
  """
61
61
  if store.record_id is None or store.record_id == "":
@@ -63,15 +63,16 @@ class DbSqliteProvider(BaseProvider):
63
63
  store.record_id = self.storage.insert(store)
64
64
  return store.record_id
65
65
 
66
- def load_all(self) -> Dict[str, AssistantStoreItem]:
66
+ def load_all(self, provider: str) -> Dict[str, RemoteStoreItem]:
67
67
  """
68
68
  Load stores from DB
69
69
 
70
+ :param provider: provider ID
70
71
  :return: stores dict
71
72
  """
72
- return self.storage.get_all()
73
+ return self.storage.get_all(provider)
73
74
 
74
- def load(self, id: int) -> AssistantStoreItem:
75
+ def load(self, id: int) -> RemoteStoreItem:
75
76
  """
76
77
  Load store from DB
77
78
 
@@ -80,11 +81,11 @@ class DbSqliteProvider(BaseProvider):
80
81
  """
81
82
  return self.storage.get_by_id(id)
82
83
 
83
- def save(self, store: AssistantStoreItem):
84
+ def save(self, store: RemoteStoreItem):
84
85
  """
85
86
  Save store to DB
86
87
 
87
- :param store: AssistantStoreItem
88
+ :param store: RemoteStoreItem
88
89
  """
89
90
  try:
90
91
  self.storage.save(store)
@@ -92,11 +93,11 @@ class DbSqliteProvider(BaseProvider):
92
93
  self.window.core.debug.log(e)
93
94
  print("Error while saving stored: {}".format(str(e)))
94
95
 
95
- def save_all(self, items: Dict[str, AssistantStoreItem]):
96
+ def save_all(self, items: Dict[str, RemoteStoreItem]):
96
97
  """
97
98
  Save all stores to DB
98
99
 
99
- :param items: dict of AssistantStoreItem objects
100
+ :param items: dict of RemoteStoreItem objects
100
101
  """
101
102
  try:
102
103
  for id in items:
@@ -124,12 +125,12 @@ class DbSqliteProvider(BaseProvider):
124
125
  """
125
126
  return self.storage.delete_by_store_id(id)
126
127
 
127
- def truncate(self) -> bool:
128
+ def truncate(self, provider: str) -> bool:
128
129
  """
129
130
  Truncate all stores
130
131
 
131
132
  :return: True if truncated
132
133
  """
133
- return self.storage.truncate_all()
134
+ return self.storage.truncate_all(provider)
134
135
 
135
136
 
@@ -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.12.14 22:00:00 #
9
+ # Updated Date: 2026.01.02 20:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import time
@@ -14,7 +14,7 @@ from typing import Dict
14
14
 
15
15
  from sqlalchemy import text
16
16
 
17
- from pygpt_net.item.assistant import AssistantStoreItem
17
+ from pygpt_net.item.store import RemoteStoreItem
18
18
 
19
19
  from .utils import pack_item_value, unpack_store
20
20
 
@@ -35,36 +35,37 @@ class Storage:
35
35
  """
36
36
  self.window = window
37
37
 
38
- def get_all(self) -> Dict[str, AssistantStoreItem]:
38
+ def get_all(self, provider: str) -> Dict[str, RemoteStoreItem]:
39
39
  """
40
- Return dict with AssistantStoreItem objects, indexed by ID
40
+ Return dict with RemoteStoreItem objects, indexed by ID
41
41
 
42
- :return: dict of AssistantStoreItem objects
42
+ :param provider: provider ID
43
+ :return: dict of RemoteStoreItem objects
43
44
  """
44
45
  stmt = text("""
45
- SELECT * FROM remote_store
46
- """)
46
+ SELECT * FROM remote_store WHERE provider = :provider
47
+ """).bindparams(provider=provider)
47
48
  items = {}
48
49
  db = self.window.core.db.get_db()
49
50
  with db.connect() as conn:
50
51
  result = conn.execute(stmt)
51
52
  for row in result:
52
- store = AssistantStoreItem()
53
+ store = RemoteStoreItem()
53
54
  unpack_store(store, row._asdict())
54
55
  items[store.id] = store # index by store ID
55
56
  return items
56
57
 
57
- def get_by_id(self, id: int) -> AssistantStoreItem:
58
+ def get_by_id(self, id: int) -> RemoteStoreItem:
58
59
  """
59
- Return AssistantStoreItem by ID
60
+ Return RemoteStoreItem by ID
60
61
 
61
62
  :param id: store item ID
62
- :return: AssistantStoreItem
63
+ :return: RemoteStoreItem
63
64
  """
64
65
  stmt = text("""
65
66
  SELECT * FROM remote_store WHERE id = :id LIMIT 1
66
67
  """).bindparams(id=id)
67
- store = AssistantStoreItem()
68
+ store = RemoteStoreItem()
68
69
  db = self.window.core.db.get_db()
69
70
  with db.connect() as conn:
70
71
  result = conn.execute(stmt)
@@ -72,17 +73,17 @@ class Storage:
72
73
  unpack_store(store, row._asdict())
73
74
  return store
74
75
 
75
- def get_by_store_id(self, id: str) -> AssistantStoreItem:
76
+ def get_by_store_id(self, id: str) -> RemoteStoreItem:
76
77
  """
77
- Return AssistantStoreItem by ID
78
+ Return RemoteStoreItem by ID
78
79
 
79
80
  :param id: store_id
80
- :return: AssistantStoreItem
81
+ :return: RemoteStoreItem
81
82
  """
82
83
  stmt = text("""
83
84
  SELECT * FROM remote_store WHERE store_id = :id LIMIT 1
84
85
  """).bindparams(id=id)
85
- store = AssistantStoreItem()
86
+ store = RemoteStoreItem()
86
87
  db = self.window.core.db.get_db()
87
88
  with db.connect() as conn:
88
89
  result = conn.execute(stmt)
@@ -90,16 +91,17 @@ class Storage:
90
91
  unpack_store(store, row._asdict())
91
92
  return store
92
93
 
93
- def truncate_all(self) -> bool:
94
+ def truncate_all(self, provider: str) -> bool:
94
95
  """
95
96
  Truncate all stores items
96
97
 
98
+ :param provider: provider ID
97
99
  :return: True if truncated
98
100
  """
99
101
  db = self.window.core.db.get_db()
100
102
  with db.begin() as conn:
101
- conn.execute(text("DELETE FROM remote_store"))
102
- conn.execute(text("DELETE FROM sqlite_sequence WHERE name='remote_store'"))
103
+ conn.execute(text("DELETE FROM remote_store WHERE provider = :provider").bindparams(provider=provider))
104
+ # conn.execute(text("DELETE FROM sqlite_sequence WHERE name='remote_store'"))
103
105
  return True
104
106
 
105
107
  def delete_by_id(self, id: int) -> bool:
@@ -132,11 +134,11 @@ class Storage:
132
134
  conn.execute(stmt)
133
135
  return True
134
136
 
135
- def save(self, store: AssistantStoreItem):
137
+ def save(self, store: RemoteStoreItem):
136
138
  """
137
139
  Insert or update store item
138
140
 
139
- :param store: AssistantStoreItem object
141
+ :param store: RemoteStoreItem object
140
142
  """
141
143
  db = self.window.core.db.get_db()
142
144
  with db.begin() as conn:
@@ -145,6 +147,7 @@ class Storage:
145
147
  UPDATE remote_store
146
148
  SET
147
149
  name = :name,
150
+ provider = :provider,
148
151
  description = :description,
149
152
  expire_days = :expire_days,
150
153
  usage_bytes = :usage_bytes,
@@ -160,6 +163,7 @@ class Storage:
160
163
  """).bindparams(
161
164
  id=store.record_id,
162
165
  name=store.name,
166
+ provider=store.provider,
163
167
  description=store.description,
164
168
  expire_days=store.expire_days,
165
169
  usage_bytes=store.usage_bytes,
@@ -174,11 +178,11 @@ class Storage:
174
178
  )
175
179
  conn.execute(stmt)
176
180
 
177
- def insert(self, store: AssistantStoreItem) -> int:
181
+ def insert(self, store: RemoteStoreItem) -> int:
178
182
  """
179
183
  Insert store item
180
184
 
181
- :param store: AssistantStoreItem object
185
+ :param store: RemoteStoreItem object
182
186
  :return: store item ID
183
187
  """
184
188
  db = self.window.core.db.get_db()
@@ -189,6 +193,7 @@ class Storage:
189
193
  store_id,
190
194
  uuid,
191
195
  name,
196
+ provider,
192
197
  description,
193
198
  expire_days,
194
199
  usage_bytes,
@@ -206,6 +211,7 @@ class Storage:
206
211
  :store_id,
207
212
  :uuid,
208
213
  :name,
214
+ :provider,
209
215
  :description,
210
216
  :expire_days,
211
217
  :usage_bytes,
@@ -222,6 +228,7 @@ class Storage:
222
228
  store_id=store.id,
223
229
  uuid=store.uuid,
224
230
  name=store.name,
231
+ provider=store.provider,
225
232
  description=store.description,
226
233
  expire_days=int(store.expire_days or 0),
227
234
  usage_bytes=int(store.usage_bytes or 0),
@@ -6,20 +6,20 @@
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.04.26 23:00:00 #
9
+ # Updated Date: 2026.01.02 20:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import json
13
13
 
14
14
  from pygpt_net.utils import unpack_var
15
- from pygpt_net.item.assistant import AssistantStoreItem
15
+ from pygpt_net.item.store import RemoteStoreItem
16
16
 
17
17
 
18
- def unpack_store(store: AssistantStoreItem, row: dict) -> AssistantStoreItem:
18
+ def unpack_store(store: RemoteStoreItem, row: dict) -> RemoteStoreItem:
19
19
  """
20
20
  Unpack store item from DB row
21
21
 
22
- :param store: store item (AssistantStoreItem)
22
+ :param store: store item (RemoteStoreItem)
23
23
  :param row: DB row
24
24
  :return: store item
25
25
  """
@@ -31,6 +31,7 @@ def unpack_store(store: AssistantStoreItem, row: dict) -> AssistantStoreItem:
31
31
  store.last_active = unpack_var(row['last_active_ts'], "int")
32
32
  store.last_sync = unpack_var(row['last_sync_ts'], "int")
33
33
  store.name = row['name']
34
+ store.provider = row['provider']
34
35
  store.description = row['description']
35
36
  store.expire_days = unpack_var(row['expire_days'], "int")
36
37
  store.usage_bytes = unpack_var(row['usage_bytes'], "int")
@@ -6,14 +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: 2023.12.31 04:00:00 #
9
+ # Updated Date: 2026.01.02 20:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import json
13
13
  import os
14
14
  import uuid
15
15
 
16
- from pygpt_net.item.assistant import AssistantStoreItem
16
+ from pygpt_net.item.store import RemoteStoreItem
17
17
  from pygpt_net.provider.core.assistant.base import BaseProvider
18
18
 
19
19
 
@@ -22,7 +22,7 @@ class JsonFileProvider(BaseProvider):
22
22
  super(JsonFileProvider, self).__init__(window)
23
23
  self.window = window
24
24
  self.id = "json_file"
25
- self.type = "assistant_store"
25
+ self.type = "remote_store"
26
26
  self.config_file = 'assistants_vector_store.json'
27
27
 
28
28
  def create_id(self) -> str:
@@ -33,11 +33,11 @@ class JsonFileProvider(BaseProvider):
33
33
  """
34
34
  return str(uuid.uuid4())
35
35
 
36
- def create(self, store: AssistantStoreItem) -> str:
36
+ def create(self, store: RemoteStoreItem) -> str:
37
37
  """
38
38
  Create new and return its ID
39
39
 
40
- :param store: AssistantStoreItem
40
+ :param store: RemoteStoreItem
41
41
  :return: vector store ID
42
42
  """
43
43
  if store.id is None or store.id == "":
@@ -61,7 +61,7 @@ class JsonFileProvider(BaseProvider):
61
61
  # deserialize
62
62
  for id in data['items']:
63
63
  item = data['items'][id]
64
- store = AssistantStoreItem()
64
+ store = RemoteStoreItem()
65
65
  self.deserialize(item, store)
66
66
  items[id] = store
67
67
  except Exception as e:
@@ -109,7 +109,7 @@ class JsonFileProvider(BaseProvider):
109
109
  pass
110
110
 
111
111
  @staticmethod
112
- def serialize(item: AssistantStoreItem) -> dict:
112
+ def serialize(item: RemoteStoreItem) -> dict:
113
113
  """
114
114
  Serialize item to dict
115
115
 
@@ -124,7 +124,7 @@ class JsonFileProvider(BaseProvider):
124
124
  }
125
125
 
126
126
  @staticmethod
127
- def deserialize(data: dict, item: AssistantStoreItem):
127
+ def deserialize(data: dict, item: RemoteStoreItem):
128
128
  """
129
129
  Deserialize item from dict
130
130
 
@@ -140,7 +140,7 @@ class JsonFileProvider(BaseProvider):
140
140
  if 'file_ids' in data:
141
141
  item.file_ids = data['file_ids']
142
142
 
143
- def dump(self, item: AssistantStoreItem) -> str:
143
+ def dump(self, item: RemoteStoreItem) -> str:
144
144
  """
145
145
  Dump to string
146
146
 
@@ -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.17 20:00:00 #
9
+ # Updated Date: 2026.01.02 19:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from typing import Optional, List, Dict
@@ -70,7 +70,7 @@ class GoogleLLM(BaseLLM):
70
70
  # -----------------------------------------------------------
71
71
  built_tools = []
72
72
  try:
73
- built_tools = window.core.api.google.build_remote_tools(model=model) or []
73
+ built_tools = window.core.api.google.remote_tools.build_remote_tools(model=model) or []
74
74
  except Exception as e:
75
75
  window.core.debug.log(e)
76
76