pygpt-net 2.7.6__py3-none-any.whl → 2.7.8__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 +13 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/app.py +5 -1
- pygpt_net/controller/assistant/batch.py +2 -2
- pygpt_net/controller/assistant/files.py +7 -6
- pygpt_net/controller/assistant/threads.py +0 -0
- pygpt_net/controller/chat/command.py +0 -0
- pygpt_net/controller/chat/remote_tools.py +3 -9
- pygpt_net/controller/chat/stream.py +2 -2
- pygpt_net/controller/chat/{handler/worker.py → stream_worker.py} +13 -35
- pygpt_net/controller/dialogs/confirm.py +35 -58
- pygpt_net/controller/lang/mapping.py +9 -9
- pygpt_net/controller/remote_store/{google/batch.py → batch.py} +209 -252
- pygpt_net/controller/remote_store/remote_store.py +982 -13
- pygpt_net/core/command/command.py +0 -0
- pygpt_net/core/db/viewer.py +1 -1
- pygpt_net/core/debug/models.py +2 -2
- pygpt_net/core/realtime/worker.py +3 -1
- pygpt_net/{controller/remote_store/google → core/remote_store/anthropic}/__init__.py +0 -1
- pygpt_net/core/remote_store/anthropic/files.py +211 -0
- pygpt_net/core/remote_store/anthropic/store.py +208 -0
- pygpt_net/core/remote_store/openai/store.py +5 -4
- pygpt_net/core/remote_store/remote_store.py +5 -1
- pygpt_net/{controller/remote_store/openai → core/remote_store/xai}/__init__.py +0 -1
- pygpt_net/core/remote_store/xai/files.py +225 -0
- pygpt_net/core/remote_store/xai/store.py +219 -0
- pygpt_net/data/config/config.json +18 -5
- pygpt_net/data/config/models.json +193 -4
- pygpt_net/data/config/settings.json +179 -36
- pygpt_net/data/icons/folder_eye.svg +1 -0
- pygpt_net/data/icons/folder_eye_filled.svg +1 -0
- pygpt_net/data/icons/folder_open.svg +1 -0
- pygpt_net/data/icons/folder_open_filled.svg +1 -0
- pygpt_net/data/locale/locale.de.ini +6 -3
- pygpt_net/data/locale/locale.en.ini +46 -12
- pygpt_net/data/locale/locale.es.ini +6 -3
- pygpt_net/data/locale/locale.fr.ini +6 -3
- pygpt_net/data/locale/locale.it.ini +6 -3
- pygpt_net/data/locale/locale.pl.ini +7 -4
- pygpt_net/data/locale/locale.uk.ini +6 -3
- pygpt_net/data/locale/locale.zh.ini +6 -3
- pygpt_net/icons.qrc +4 -0
- pygpt_net/icons_rc.py +282 -138
- pygpt_net/plugin/cmd_mouse_control/worker.py +2 -1
- pygpt_net/plugin/cmd_mouse_control/worker_sandbox.py +2 -1
- pygpt_net/provider/api/anthropic/__init__.py +10 -3
- pygpt_net/provider/api/anthropic/chat.py +342 -11
- pygpt_net/provider/api/anthropic/computer.py +844 -0
- pygpt_net/provider/api/anthropic/remote_tools.py +172 -0
- pygpt_net/provider/api/anthropic/store.py +307 -0
- pygpt_net/{controller/chat/handler/anthropic_stream.py → provider/api/anthropic/stream.py} +99 -10
- pygpt_net/provider/api/anthropic/tools.py +32 -77
- pygpt_net/provider/api/anthropic/utils.py +30 -0
- pygpt_net/{controller/chat/handler → provider/api/anthropic/worker}/__init__.py +0 -0
- pygpt_net/provider/api/anthropic/worker/importer.py +278 -0
- pygpt_net/provider/api/google/chat.py +62 -9
- pygpt_net/provider/api/google/store.py +124 -3
- pygpt_net/{controller/chat/handler/google_stream.py → provider/api/google/stream.py} +92 -25
- pygpt_net/provider/api/google/utils.py +185 -0
- pygpt_net/provider/api/google/worker/importer.py +16 -28
- pygpt_net/provider/api/langchain/__init__.py +0 -0
- pygpt_net/{controller/chat/handler/langchain_stream.py → provider/api/langchain/stream.py} +1 -1
- pygpt_net/provider/api/llama_index/__init__.py +0 -0
- pygpt_net/{controller/chat/handler/llamaindex_stream.py → provider/api/llama_index/stream.py} +1 -1
- pygpt_net/provider/api/openai/assistants.py +2 -2
- pygpt_net/provider/api/openai/image.py +2 -2
- pygpt_net/provider/api/openai/store.py +4 -1
- pygpt_net/{controller/chat/handler/openai_stream.py → provider/api/openai/stream.py} +1 -1
- pygpt_net/provider/api/openai/utils.py +69 -3
- pygpt_net/provider/api/openai/worker/importer.py +19 -61
- pygpt_net/provider/api/openai/worker/importer_assistants.py +230 -0
- pygpt_net/provider/api/x_ai/__init__.py +138 -15
- pygpt_net/provider/api/x_ai/audio.py +43 -11
- pygpt_net/provider/api/x_ai/chat.py +92 -4
- pygpt_net/provider/api/x_ai/image.py +149 -47
- pygpt_net/provider/api/x_ai/realtime/__init__.py +12 -0
- pygpt_net/provider/api/x_ai/realtime/client.py +1825 -0
- pygpt_net/provider/api/x_ai/realtime/realtime.py +198 -0
- pygpt_net/provider/api/x_ai/{remote.py → remote_tools.py} +183 -70
- pygpt_net/provider/api/x_ai/responses.py +507 -0
- pygpt_net/provider/api/x_ai/store.py +610 -0
- pygpt_net/{controller/chat/handler/xai_stream.py → provider/api/x_ai/stream.py} +42 -10
- pygpt_net/provider/api/x_ai/tools.py +59 -8
- pygpt_net/{controller/chat/handler → provider/api/x_ai}/utils.py +1 -2
- pygpt_net/provider/api/x_ai/vision.py +1 -4
- pygpt_net/provider/api/x_ai/worker/importer.py +308 -0
- pygpt_net/provider/audio_input/xai_grok_voice.py +390 -0
- pygpt_net/provider/audio_output/xai_tts.py +325 -0
- pygpt_net/provider/core/config/patch.py +39 -3
- pygpt_net/provider/core/config/patches/patch_before_2_6_42.py +2 -2
- pygpt_net/provider/core/model/patch.py +39 -1
- pygpt_net/tools/image_viewer/tool.py +334 -34
- pygpt_net/tools/image_viewer/ui/dialogs.py +319 -22
- pygpt_net/tools/text_editor/ui/dialogs.py +3 -2
- pygpt_net/tools/text_editor/ui/widgets.py +0 -0
- pygpt_net/ui/dialog/assistant.py +1 -1
- pygpt_net/ui/dialog/plugins.py +13 -5
- pygpt_net/ui/dialog/remote_store.py +552 -0
- pygpt_net/ui/dialogs.py +3 -5
- pygpt_net/ui/layout/ctx/ctx_list.py +58 -7
- pygpt_net/ui/menu/tools.py +6 -13
- pygpt_net/ui/widget/dialog/base.py +16 -5
- pygpt_net/ui/widget/dialog/{remote_store_google.py → remote_store.py} +10 -10
- pygpt_net/ui/widget/element/button.py +4 -4
- pygpt_net/ui/widget/image/display.py +2 -2
- pygpt_net/ui/widget/lists/context.py +2 -2
- pygpt_net/ui/widget/textarea/editor.py +0 -0
- {pygpt_net-2.7.6.dist-info → pygpt_net-2.7.8.dist-info}/METADATA +15 -2
- {pygpt_net-2.7.6.dist-info → pygpt_net-2.7.8.dist-info}/RECORD +107 -89
- pygpt_net/controller/remote_store/google/store.py +0 -615
- pygpt_net/controller/remote_store/openai/batch.py +0 -524
- pygpt_net/controller/remote_store/openai/store.py +0 -699
- pygpt_net/ui/dialog/remote_store_google.py +0 -539
- pygpt_net/ui/dialog/remote_store_openai.py +0 -539
- pygpt_net/ui/widget/dialog/remote_store_openai.py +0 -56
- pygpt_net/ui/widget/lists/remote_store_google.py +0 -248
- pygpt_net/ui/widget/lists/remote_store_openai.py +0 -317
- {pygpt_net-2.7.6.dist-info → pygpt_net-2.7.8.dist-info}/LICENSE +0 -0
- {pygpt_net-2.7.6.dist-info → pygpt_net-2.7.8.dist-info}/WHEEL +0 -0
- {pygpt_net-2.7.6.dist-info → pygpt_net-2.7.8.dist-info}/entry_points.txt +0 -0
pygpt_net/CHANGELOG.txt
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
2.7.8 (2026-01-06)
|
|
2
|
+
|
|
3
|
+
- Added the xAI Collections remote tool and integrated collections management into the Remote Vector Stores tool.
|
|
4
|
+
- Unified the Remote Vector Stores tool into a single tool for all providers.
|
|
5
|
+
- Added xAI Grok audio input and output provider (realtime audio support for Grok coming soon!).
|
|
6
|
+
- Enhanced the Image Viewer tool with a toolbox featuring Prev/Next and more options.
|
|
7
|
+
|
|
8
|
+
2.7.7 (2026-01-05)
|
|
9
|
+
|
|
10
|
+
- Added support for Responses API in xAI.
|
|
11
|
+
- Added xAI remote tools: Remote MCP, Code Execution.
|
|
12
|
+
- Added Anthropic remote tools: Remote MCP, Web Fetch, Code Execution.
|
|
13
|
+
|
|
1
14
|
2.7.6 (2026-01-03)
|
|
2
15
|
|
|
3
16
|
- Fixed compatibility with xAI SDK and resolved empty responses from Grok models.
|
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: 2026-01-
|
|
9
|
+
# Updated Date: 2026-01-06 00:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
__author__ = "Marcin Szczygliński"
|
|
13
13
|
__copyright__ = "Copyright 2026, Marcin Szczygliński"
|
|
14
14
|
__credits__ = ["Marcin Szczygliński"]
|
|
15
15
|
__license__ = "MIT"
|
|
16
|
-
__version__ = "2.7.
|
|
17
|
-
__build__ = "2026-01-
|
|
16
|
+
__version__ = "2.7.8"
|
|
17
|
+
__build__ = "2026-01-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"
|
pygpt_net/app.py
CHANGED
|
@@ -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:
|
|
9
|
+
# Updated Date: 2026.01.06 20:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
import os
|
|
@@ -329,11 +329,13 @@ def run(**kwargs):
|
|
|
329
329
|
from pygpt_net.provider.audio_input.google_cloud_speech_recognition import GoogleCloudSpeechRecognition
|
|
330
330
|
from pygpt_net.provider.audio_input.google_genai import GoogleGenAIAudioInput
|
|
331
331
|
from pygpt_net.provider.audio_input.bing_speech_recognition import BingSpeechRecognition
|
|
332
|
+
from pygpt_net.provider.audio_input.xai_grok_voice import XAIGrokVoiceAudioInput
|
|
332
333
|
from pygpt_net.provider.audio_output.openai_tts import OpenAITextToSpeech
|
|
333
334
|
from pygpt_net.provider.audio_output.ms_azure_tts import MSAzureTextToSpeech
|
|
334
335
|
from pygpt_net.provider.audio_output.google_tts import GoogleTextToSpeech
|
|
335
336
|
from pygpt_net.provider.audio_output.google_genai_tts import GoogleGenAITextToSpeech
|
|
336
337
|
from pygpt_net.provider.audio_output.eleven_labs import ElevenLabsTextToSpeech
|
|
338
|
+
from pygpt_net.provider.audio_output.xai_tts import XAITextToSpeech
|
|
337
339
|
|
|
338
340
|
# web search engine providers
|
|
339
341
|
from pygpt_net.provider.web.google_custom_search import GoogleCustomSearch
|
|
@@ -361,11 +363,13 @@ def run(**kwargs):
|
|
|
361
363
|
launcher.add_audio_input(GoogleCloudSpeechRecognition())
|
|
362
364
|
launcher.add_audio_input(GoogleGenAIAudioInput())
|
|
363
365
|
launcher.add_audio_input(BingSpeechRecognition())
|
|
366
|
+
launcher.add_audio_input(XAIGrokVoiceAudioInput())
|
|
364
367
|
launcher.add_audio_output(OpenAITextToSpeech())
|
|
365
368
|
launcher.add_audio_output(MSAzureTextToSpeech())
|
|
366
369
|
launcher.add_audio_output(GoogleTextToSpeech())
|
|
367
370
|
launcher.add_audio_output(GoogleGenAITextToSpeech())
|
|
368
371
|
launcher.add_audio_output(ElevenLabsTextToSpeech())
|
|
372
|
+
launcher.add_audio_output(XAITextToSpeech())
|
|
369
373
|
|
|
370
374
|
# register custom audio providers
|
|
371
375
|
providers = kwargs.get('audio_input', None)
|
|
@@ -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: 2026.01.
|
|
9
|
+
# Updated Date: 2026.01.05 17:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
from typing import Any
|
|
@@ -49,7 +49,7 @@ class Batch:
|
|
|
49
49
|
:param num: number of imported assistants
|
|
50
50
|
"""
|
|
51
51
|
self.window.controller.assistant.update()
|
|
52
|
-
self.window.controller.remote_store.
|
|
52
|
+
self.window.controller.remote_store.update()
|
|
53
53
|
self.window.controller.assistant.files.update()
|
|
54
54
|
self.window.update_status("OK. Imported assistants: " + str(num) + ".")
|
|
55
55
|
self.window.ui.dialogs.alert(trans("status.finished"))
|
|
@@ -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: 2026.01.
|
|
9
|
+
# Updated Date: 2026.01.05 17:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
import os
|
|
@@ -31,7 +31,7 @@ class Files:
|
|
|
31
31
|
def update(self):
|
|
32
32
|
"""Update assistants files list"""
|
|
33
33
|
self.update_list()
|
|
34
|
-
self.window.controller.remote_store.
|
|
34
|
+
self.window.controller.remote_store.update_files_list()
|
|
35
35
|
|
|
36
36
|
def select(self, idx: int):
|
|
37
37
|
"""
|
|
@@ -76,7 +76,7 @@ class Files:
|
|
|
76
76
|
"""
|
|
77
77
|
# run asynchronous
|
|
78
78
|
self.window.update_status("Importing files...please wait...")
|
|
79
|
-
self.window.core.api.openai.
|
|
79
|
+
self.window.core.api.openai.store.importer.import_files(store_id)
|
|
80
80
|
|
|
81
81
|
def download(self, idx: Union[int, list]):
|
|
82
82
|
"""
|
|
@@ -181,7 +181,8 @@ class Files:
|
|
|
181
181
|
|
|
182
182
|
# update store status
|
|
183
183
|
if assistant.vector_store:
|
|
184
|
-
|
|
184
|
+
# TODO: only openai
|
|
185
|
+
self.window.controller.remote_store.refresh_by_store_id(assistant.vector_store, "openai")
|
|
185
186
|
|
|
186
187
|
self.window.update_status(trans('status.deleted'))
|
|
187
188
|
|
|
@@ -228,7 +229,7 @@ class Files:
|
|
|
228
229
|
|
|
229
230
|
# update store status
|
|
230
231
|
if assistant.vector_store:
|
|
231
|
-
self.window.controller.remote_store.
|
|
232
|
+
self.window.controller.remote_store.refresh_by_store_id(assistant.vector_store, "openai")
|
|
232
233
|
|
|
233
234
|
self.window.update_status(trans('status.deleted'))
|
|
234
235
|
except Exception as e:
|
|
@@ -341,7 +342,7 @@ class Files:
|
|
|
341
342
|
if num > 0:
|
|
342
343
|
# update store status
|
|
343
344
|
if assistant.vector_store:
|
|
344
|
-
self.window.controller.remote_store.
|
|
345
|
+
self.window.controller.remote_store.refresh_by_store_id(assistant.vector_store, "openai")
|
|
345
346
|
|
|
346
347
|
self.update_list() # update uploaded list UI
|
|
347
348
|
|
|
File without changes
|
|
File without changes
|
|
@@ -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:
|
|
9
|
+
# Updated Date: 2026.01.04 19:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
from typing import Union
|
|
@@ -69,11 +69,7 @@ class RemoteTools:
|
|
|
69
69
|
elif model.provider == "anthropic": # native SDK
|
|
70
70
|
state = cfg_get("remote_tools.anthropic.web_search", False)
|
|
71
71
|
elif model.provider == "x_ai": # native SDK
|
|
72
|
-
|
|
73
|
-
if mode not in ("auto", "on", "off"):
|
|
74
|
-
mode = "auto"
|
|
75
|
-
if mode == "auto" or mode == "on":
|
|
76
|
-
state = True
|
|
72
|
+
state = cfg_get("remote_tools.xai.web_search", False)
|
|
77
73
|
|
|
78
74
|
# if not enabled by default or other provider, then use global config
|
|
79
75
|
if not state:
|
|
@@ -109,9 +105,7 @@ class RemoteTools:
|
|
|
109
105
|
cfg_set("remote_tools.web_search", state)
|
|
110
106
|
cfg_set("remote_tools.google.web_search", state)
|
|
111
107
|
cfg_set("remote_tools.anthropic.web_search", state)
|
|
112
|
-
|
|
113
|
-
# xAI has 3 modes: auto, on, off
|
|
114
|
-
cfg_set("remote_tools.xai.mode", "on" if state else "off")
|
|
108
|
+
cfg_set("remote_tools.xai.web_search", state)
|
|
115
109
|
|
|
116
110
|
# save config
|
|
117
111
|
self.window.core.config.save()
|
|
@@ -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:
|
|
9
|
+
# Updated Date: 2026.01.05 20:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
from typing import Optional
|
|
@@ -18,7 +18,7 @@ from pygpt_net.core.events import RenderEvent
|
|
|
18
18
|
from pygpt_net.core.types import MODE_ASSISTANT
|
|
19
19
|
from pygpt_net.item.ctx import CtxItem
|
|
20
20
|
|
|
21
|
-
from .
|
|
21
|
+
from .stream_worker import StreamWorker
|
|
22
22
|
|
|
23
23
|
class Stream(QObject):
|
|
24
24
|
def __init__(self, window=None):
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
|
7
7
|
# MIT License #
|
|
8
8
|
# Created By : Marcin Szczygliński #
|
|
9
|
-
# Updated Date: 2026.01.
|
|
9
|
+
# Updated Date: 2026.01.05 20:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
import io
|
|
13
13
|
import json
|
|
14
14
|
from dataclasses import dataclass, field
|
|
15
|
-
from typing import Optional,
|
|
15
|
+
from typing import Optional, Any
|
|
16
16
|
|
|
17
17
|
from PySide6.QtCore import QObject, Signal, Slot, QRunnable
|
|
18
18
|
from openai.types.chat import ChatCompletionChunk
|
|
@@ -20,36 +20,15 @@ from openai.types.chat import ChatCompletionChunk
|
|
|
20
20
|
from pygpt_net.core.events import RenderEvent
|
|
21
21
|
from pygpt_net.core.types.chunk import ChunkType
|
|
22
22
|
from pygpt_net.item.ctx import CtxItem
|
|
23
|
+
from pygpt_net.provider.api.google.utils import capture_google_usage
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
utils as stream_utils,
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
# OpenAI Responses Events
|
|
35
|
-
EventType = Literal[
|
|
36
|
-
"response.completed",
|
|
37
|
-
"response.output_text.delta",
|
|
38
|
-
"response.output_item.added",
|
|
39
|
-
"response.function_call_arguments.delta",
|
|
40
|
-
"response.function_call_arguments.done",
|
|
41
|
-
"response.output_text.annotation.added",
|
|
42
|
-
"response.reasoning_summary_text.delta",
|
|
43
|
-
"response.output_item.done",
|
|
44
|
-
"response.code_interpreter_call_code.delta",
|
|
45
|
-
"response.code_interpreter_call_code.done",
|
|
46
|
-
"response.image_generation_call.partial_image",
|
|
47
|
-
"response.created",
|
|
48
|
-
"response.done",
|
|
49
|
-
"response.failed",
|
|
50
|
-
"error",
|
|
51
|
-
]
|
|
52
|
-
|
|
25
|
+
# Import provider-specific stream processors
|
|
26
|
+
from pygpt_net.provider.api.openai import stream as openai_stream
|
|
27
|
+
from pygpt_net.provider.api.google import stream as google_stream
|
|
28
|
+
from pygpt_net.provider.api.anthropic import stream as anthropic_stream
|
|
29
|
+
from pygpt_net.provider.api.x_ai import stream as xai_stream
|
|
30
|
+
from pygpt_net.provider.api.llama_index import stream as llamaindex_stream
|
|
31
|
+
from pygpt_net.provider.api.langchain import stream as langchain_stream
|
|
53
32
|
|
|
54
33
|
class WorkerSignals(QObject):
|
|
55
34
|
"""
|
|
@@ -136,7 +115,7 @@ class StreamWorker(QRunnable):
|
|
|
136
115
|
state.stopped = True
|
|
137
116
|
break
|
|
138
117
|
|
|
139
|
-
etype: Optional[
|
|
118
|
+
etype: Optional[str] = None
|
|
140
119
|
|
|
141
120
|
# detect chunk type if not defined
|
|
142
121
|
if ctx.chunk_type:
|
|
@@ -378,7 +357,7 @@ class StreamWorker(QRunnable):
|
|
|
378
357
|
state.generator.resolve()
|
|
379
358
|
um = getattr(state.generator, "usage_metadata", None)
|
|
380
359
|
if um:
|
|
381
|
-
|
|
360
|
+
capture_google_usage(state, um)
|
|
382
361
|
except Exception:
|
|
383
362
|
pass
|
|
384
363
|
|
|
@@ -473,7 +452,7 @@ class StreamWorker(QRunnable):
|
|
|
473
452
|
core,
|
|
474
453
|
state: WorkerState,
|
|
475
454
|
chunk,
|
|
476
|
-
etype: Optional[
|
|
455
|
+
etype: Optional[str]
|
|
477
456
|
) -> Optional[str]:
|
|
478
457
|
"""
|
|
479
458
|
Dispatches processing to concrete provider-specific processing.
|
|
@@ -526,7 +505,6 @@ class StreamWorker(QRunnable):
|
|
|
526
505
|
return anthropic_stream.process_anthropic_chunk(ctx, core, state, chunk)
|
|
527
506
|
|
|
528
507
|
def _process_xai_sdk_chunk(self, ctx, core, state, item):
|
|
529
|
-
print(item)
|
|
530
508
|
return xai_stream.process_xai_sdk_chunk(ctx, core, state, item)
|
|
531
509
|
|
|
532
510
|
def _process_raw(self, chunk) -> Optional[str]:
|
|
@@ -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: 2026.01.
|
|
9
|
+
# Updated Date: 2026.01.05 17:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
from typing import Any, Optional
|
|
@@ -195,61 +195,38 @@ class Confirm:
|
|
|
195
195
|
elif type == 'assistant.functions.clear':
|
|
196
196
|
self.window.controller.assistant.editor.clear_functions(True)
|
|
197
197
|
|
|
198
|
-
#
|
|
199
|
-
elif type == 'remote_store.
|
|
200
|
-
self.window.controller.remote_store.
|
|
201
|
-
elif type == 'remote_store.
|
|
202
|
-
self.window.controller.remote_store.
|
|
203
|
-
elif type == 'remote_store.
|
|
204
|
-
self.window.controller.remote_store.
|
|
205
|
-
elif type == 'remote_store.
|
|
206
|
-
self.window.controller.remote_store.
|
|
207
|
-
elif type == 'remote_store.
|
|
208
|
-
self.window.controller.remote_store.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
self.window.controller.remote_store.google.delete(id, True)
|
|
231
|
-
elif type == 'remote_store.google.import':
|
|
232
|
-
self.window.controller.remote_store.google.batch.import_stores(True)
|
|
233
|
-
elif type == 'remote_store.google.truncate':
|
|
234
|
-
self.window.controller.remote_store.google.batch.truncate_stores(True)
|
|
235
|
-
elif type == 'remote_store.google.clear':
|
|
236
|
-
self.window.controller.remote_store.google.batch.clear_stores(True)
|
|
237
|
-
elif type == 'remote_store.google.refresh':
|
|
238
|
-
self.window.controller.remote_store.google.batch.refresh_stores(True)
|
|
239
|
-
elif type == 'remote_store.google.files.import.all':
|
|
240
|
-
self.window.controller.remote_store.google.batch.import_files(True)
|
|
241
|
-
elif type == 'remote_store.google.files.import.store':
|
|
242
|
-
self.window.controller.remote_store.google.batch.import_store_files(id, True)
|
|
243
|
-
elif type == 'remote_store.google.files.truncate':
|
|
244
|
-
self.window.controller.remote_store.google.batch.truncate_files(True)
|
|
245
|
-
elif type == 'remote_store.google.files.truncate.store':
|
|
246
|
-
self.window.controller.remote_store.google.batch.truncate_store_files(id, True)
|
|
247
|
-
elif type == 'remote_store.google.files.clear.all':
|
|
248
|
-
self.window.controller.remote_store.google.batch.clear_files(True)
|
|
249
|
-
elif type == 'remote_store.google.files.clear.store':
|
|
250
|
-
self.window.controller.remote_store.google.batch.clear_store_files(id, True)
|
|
251
|
-
elif type == 'remote_store.google.files.upload':
|
|
252
|
-
self.window.controller.remote_store.google.batch.upload(True)
|
|
198
|
+
# Remote vector stores
|
|
199
|
+
elif type == 'remote_store.delete':
|
|
200
|
+
self.window.controller.remote_store.delete(id, True)
|
|
201
|
+
elif type == 'remote_store.import':
|
|
202
|
+
self.window.controller.remote_store.batch.import_stores(True)
|
|
203
|
+
elif type == 'remote_store.truncate':
|
|
204
|
+
self.window.controller.remote_store.batch.truncate_stores(True)
|
|
205
|
+
elif type == 'remote_store.clear':
|
|
206
|
+
self.window.controller.remote_store.batch.clear_stores(True)
|
|
207
|
+
elif type == 'remote_store.refresh':
|
|
208
|
+
self.window.controller.remote_store.batch.refresh_stores(True)
|
|
209
|
+
|
|
210
|
+
elif type == 'remote_store.file.delete':
|
|
211
|
+
self.window.controller.remote_store.delete_file_by_idx(id, True)
|
|
212
|
+
elif type == 'remote_store.files.upload':
|
|
213
|
+
self.window.controller.remote_store.batch.upload(True)
|
|
214
|
+
elif type == 'remote_store.files.import.all':
|
|
215
|
+
self.window.controller.remote_store.batch.import_files(True)
|
|
216
|
+
elif type == 'remote_store.files.import.store':
|
|
217
|
+
self.window.controller.remote_store.batch.import_store_files(id, True)
|
|
218
|
+
elif type == 'remote_store.files.import.assistant.current':
|
|
219
|
+
self.window.controller.remote_store.batch.import_files_assistant_current(True) # from current assistant
|
|
220
|
+
elif type == 'remote_store.files.import.assistant.all':
|
|
221
|
+
self.window.controller.remote_store.batch.import_files_assistant_all(True) # from all assistants
|
|
222
|
+
elif type == 'remote_store.files.truncate':
|
|
223
|
+
self.window.controller.remote_store.batch.truncate_files(True)
|
|
224
|
+
elif type == 'remote_store.files.truncate.store':
|
|
225
|
+
self.window.controller.remote_store.batch.truncate_store_files(id, True)
|
|
226
|
+
elif type == 'remote_store.files.clear.all':
|
|
227
|
+
self.window.controller.remote_store.batch.clear_files(True)
|
|
228
|
+
elif type == 'remote_store.files.clear.store':
|
|
229
|
+
self.window.controller.remote_store.batch.clear_store_files(id, True)
|
|
253
230
|
|
|
254
231
|
# settings
|
|
255
232
|
elif type == 'settings.defaults.user':
|
|
@@ -390,8 +367,8 @@ class Confirm:
|
|
|
390
367
|
self.window.controller.ctx.create_group(name, id)
|
|
391
368
|
elif type == 'agent.builder.agent':
|
|
392
369
|
self.window.tools.get("agent_builder").add_agent(name)
|
|
393
|
-
elif type == 'remote_store.
|
|
394
|
-
self.window.controller.remote_store.
|
|
370
|
+
elif type == 'remote_store.new':
|
|
371
|
+
self.window.controller.remote_store.new(name, True)
|
|
395
372
|
|
|
396
373
|
def accept_url(self, type: str, id: any, url: str):
|
|
397
374
|
"""
|
|
@@ -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: 2026.01.
|
|
9
|
+
# Updated Date: 2026.01.05 17:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
from typing import Dict
|
|
@@ -164,12 +164,12 @@ class Mapping:
|
|
|
164
164
|
nodes['assistant.tool.function.label'] = 'assistant.functions.label'
|
|
165
165
|
|
|
166
166
|
# assistants: vector store
|
|
167
|
-
nodes['remote_store.
|
|
168
|
-
nodes['remote_store.
|
|
169
|
-
nodes['remote_store.
|
|
170
|
-
nodes['remote_store.
|
|
171
|
-
nodes['remote_store.
|
|
172
|
-
nodes['remote_store.
|
|
167
|
+
nodes['remote_store.btn.new'] = 'dialog.remote_store.btn.new'
|
|
168
|
+
nodes['remote_store.btn.save'] = 'dialog.remote_store.btn.save'
|
|
169
|
+
nodes['remote_store.btn.upload.files'] = 'dialog.remote_store.btn.upload.files'
|
|
170
|
+
nodes['remote_store.btn.upload.dir'] = 'dialog.remote_store.btn.upload.dir'
|
|
171
|
+
nodes['remote_store.btn.close'] = 'dialog.remote_store.btn.close'
|
|
172
|
+
nodes['remote_store.hide_thread'] = 'remote_store.hide_threads'
|
|
173
173
|
|
|
174
174
|
# vision
|
|
175
175
|
nodes['inline.vision'] = 'inline.vision'
|
|
@@ -402,7 +402,7 @@ class Mapping:
|
|
|
402
402
|
dialog_title['config.editor'] = 'dialog.editor.title'
|
|
403
403
|
dialog_title['config.settings'] = 'dialog.settings'
|
|
404
404
|
dialog_title['editor.assistants'] = 'dialog.assistant'
|
|
405
|
-
dialog_title['remote_store
|
|
405
|
+
dialog_title['remote_store'] = 'dialog.remote_store'
|
|
406
406
|
dialog_title['editor.preset.presets'] = 'dialog.preset'
|
|
407
407
|
dialog_title['image'] = 'dialog.image.title'
|
|
408
408
|
dialog_title['interpreter'] = 'dialog.interpreter.title'
|
|
@@ -424,7 +424,7 @@ class Mapping:
|
|
|
424
424
|
tooltips['icon.audio.output'] = 'icon.audio.output'
|
|
425
425
|
tooltips['icon.audio.input'] = 'icon.audio.input'
|
|
426
426
|
tooltips['icon.remote_tool.web'] = 'icon.remote_tool.web'
|
|
427
|
-
tooltips['remote_store.
|
|
427
|
+
tooltips['remote_store.btn.refresh_status'] = 'dialog.remote_store.btn.refresh_status'
|
|
428
428
|
tooltips['agent.llama.loop.score'] = 'toolbox.agent.llama.loop.score.tooltip'
|
|
429
429
|
|
|
430
430
|
menu_tooltips = {}
|