pygpt-net 2.6.42__py3-none-any.whl → 2.6.44__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/controller/__init__.py +2 -0
- pygpt_net/controller/debug/debug.py +7 -19
- pygpt_net/controller/debug/fixtures.py +103 -0
- pygpt_net/controller/launcher/launcher.py +2 -2
- pygpt_net/controller/presets/presets.py +10 -0
- pygpt_net/core/debug/debug.py +2 -2
- pygpt_net/core/fixtures/stream/__init__.py +0 -0
- pygpt_net/{provider/api/fake → core/fixtures/stream}/generator.py +1 -1
- pygpt_net/core/models/models.py +11 -1
- pygpt_net/core/render/web/body.py +5 -1
- pygpt_net/core/updater/updater.py +18 -7
- pygpt_net/data/config/config.json +10 -6
- pygpt_net/data/config/models.json +4 -10
- pygpt_net/data/config/settings.json +59 -19
- pygpt_net/data/css/web-blocks.css +4 -0
- pygpt_net/data/css/web-chatgpt.css +4 -0
- pygpt_net/data/css/web-chatgpt_wide.css +4 -0
- pygpt_net/data/js/app.js +727 -361
- pygpt_net/data/locale/locale.en.ini +8 -1
- pygpt_net/js_rc.py +11506 -10502
- pygpt_net/provider/api/openai/__init__.py +4 -12
- pygpt_net/provider/core/config/patch.py +26 -2457
- pygpt_net/provider/core/config/patches/__init__.py +0 -0
- pygpt_net/provider/core/config/patches/patch_before_2_6_42.py +2510 -0
- pygpt_net/provider/core/model/patch.py +12 -764
- pygpt_net/provider/core/model/patches/__init__.py +0 -0
- pygpt_net/provider/core/model/patches/patch_before_2_6_42.py +813 -0
- pygpt_net/provider/core/preset/patch.py +12 -221
- pygpt_net/provider/core/preset/patches/__init__.py +0 -0
- pygpt_net/provider/core/preset/patches/patch_before_2_6_42.py +272 -0
- pygpt_net/ui/base/context_menu.py +3 -2
- pygpt_net/ui/dialog/settings.py +5 -4
- pygpt_net/ui/layout/ctx/ctx_list.py +3 -3
- pygpt_net/ui/menu/debug.py +36 -23
- pygpt_net/ui/widget/lists/context.py +233 -51
- {pygpt_net-2.6.42.dist-info → pygpt_net-2.6.44.dist-info}/METADATA +18 -129
- {pygpt_net-2.6.42.dist-info → pygpt_net-2.6.44.dist-info}/RECORD +43 -35
- /pygpt_net/{provider/api/fake/__init__.py → core/fixtures/__init__} +0 -0
- {pygpt_net-2.6.42.dist-info → pygpt_net-2.6.44.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.42.dist-info → pygpt_net-2.6.44.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.42.dist-info → pygpt_net-2.6.44.dist-info}/entry_points.txt +0 -0
|
@@ -6,9 +6,8 @@
|
|
|
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.
|
|
9
|
+
# Updated Date: 2025.09.12 20:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
|
-
import os
|
|
12
11
|
|
|
13
12
|
from openai import OpenAI
|
|
14
13
|
|
|
@@ -24,7 +23,6 @@ from pygpt_net.core.types import (
|
|
|
24
23
|
)
|
|
25
24
|
from pygpt_net.core.bridge.context import BridgeContext
|
|
26
25
|
from pygpt_net.item.model import ModelItem
|
|
27
|
-
from pygpt_net.provider.api.fake.generator import FakeOpenAIStream
|
|
28
26
|
|
|
29
27
|
from .audio import Audio
|
|
30
28
|
from .assistants import Assistants
|
|
@@ -119,7 +117,7 @@ class ApiOpenAI:
|
|
|
119
117
|
use_responses_api = self.responses.is_enabled(model, mode, parent_mode, is_expert_call, preset)
|
|
120
118
|
ctx.use_responses_api = use_responses_api # set in context
|
|
121
119
|
|
|
122
|
-
|
|
120
|
+
fixtures = self.window.controller.debug.fixtures
|
|
123
121
|
|
|
124
122
|
# get model id
|
|
125
123
|
model_id = None
|
|
@@ -159,15 +157,9 @@ class ApiOpenAI:
|
|
|
159
157
|
if is_realtime:
|
|
160
158
|
return True
|
|
161
159
|
|
|
162
|
-
if
|
|
163
|
-
# fake stream for testing
|
|
160
|
+
if fixtures.is_enabled("stream"): # fake stream for testing
|
|
164
161
|
use_responses_api = False
|
|
165
|
-
|
|
166
|
-
test_code_path = os.path.join(self.window.core.config.get_app_path(), "data", "js", "app.js")
|
|
167
|
-
response = FakeOpenAIStream(code_path=test_code_path).stream(
|
|
168
|
-
api="raw",
|
|
169
|
-
chunk="code",
|
|
170
|
-
)
|
|
162
|
+
response = fixtures.get_stream_generator(ctx)
|
|
171
163
|
else:
|
|
172
164
|
# responses API
|
|
173
165
|
if use_responses_api:
|