pygpt-net 2.6.14__py3-none-any.whl → 2.6.16__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 +12 -0
- pygpt_net/__init__.py +3 -3
- pygpt_net/controller/chat/command.py +18 -6
- pygpt_net/controller/chat/render.py +10 -1
- pygpt_net/controller/plugins/plugins.py +31 -15
- pygpt_net/controller/plugins/settings.py +10 -1
- pygpt_net/controller/presets/editor.py +11 -32
- pygpt_net/controller/theme/common.py +2 -2
- pygpt_net/controller/ui/tabs.py +5 -1
- pygpt_net/core/agents/observer/evaluation.py +3 -14
- pygpt_net/core/agents/runners/llama_workflow.py +9 -6
- pygpt_net/core/command/command.py +5 -3
- pygpt_net/core/experts/experts.py +58 -13
- pygpt_net/core/plugins/plugins.py +12 -1
- pygpt_net/core/render/base.py +8 -0
- pygpt_net/core/render/markdown/renderer.py +9 -0
- pygpt_net/core/render/plain/renderer.py +9 -0
- pygpt_net/core/render/web/renderer.py +17 -3
- pygpt_net/data/config/config.json +6 -6
- pygpt_net/data/config/models.json +3 -3
- pygpt_net/data/locale/locale.de.ini +1 -0
- pygpt_net/data/locale/locale.en.ini +3 -2
- pygpt_net/data/locale/locale.es.ini +1 -0
- pygpt_net/data/locale/locale.fr.ini +1 -0
- pygpt_net/data/locale/locale.it.ini +1 -0
- pygpt_net/data/locale/locale.pl.ini +2 -1
- pygpt_net/data/locale/locale.uk.ini +1 -0
- pygpt_net/data/locale/locale.zh.ini +1 -0
- pygpt_net/data/locale/plugin.openai_dalle.de.ini +1 -1
- pygpt_net/data/locale/plugin.openai_dalle.en.ini +1 -1
- pygpt_net/data/locale/plugin.openai_dalle.es.ini +1 -1
- pygpt_net/data/locale/plugin.openai_dalle.fr.ini +1 -1
- pygpt_net/data/locale/plugin.openai_dalle.it.ini +1 -1
- pygpt_net/data/locale/plugin.openai_dalle.pl.ini +1 -1
- pygpt_net/data/locale/plugin.openai_dalle.uk.ini +1 -1
- pygpt_net/data/locale/plugin.openai_dalle.zh.ini +1 -1
- pygpt_net/data/locale/plugin.openai_vision.de.ini +1 -1
- pygpt_net/data/locale/plugin.openai_vision.en.ini +1 -1
- pygpt_net/data/locale/plugin.openai_vision.es.ini +1 -1
- pygpt_net/data/locale/plugin.openai_vision.fr.ini +1 -1
- pygpt_net/data/locale/plugin.openai_vision.it.ini +1 -1
- pygpt_net/data/locale/plugin.openai_vision.pl.ini +1 -1
- pygpt_net/data/locale/plugin.openai_vision.uk.ini +1 -1
- pygpt_net/data/locale/plugin.openai_vision.zh.ini +1 -1
- pygpt_net/item/ctx.py +5 -4
- pygpt_net/plugin/idx_llama_index/plugin.py +9 -5
- pygpt_net/plugin/idx_llama_index/worker.py +5 -2
- pygpt_net/plugin/openai_dalle/plugin.py +1 -1
- pygpt_net/tools/translator/ui/dialogs.py +1 -0
- pygpt_net/tools/translator/ui/widgets.py +1 -2
- pygpt_net/ui/dialog/plugins.py +6 -4
- pygpt_net/ui/widget/textarea/editor.py +1 -2
- {pygpt_net-2.6.14.dist-info → pygpt_net-2.6.16.dist-info}/METADATA +24 -12
- {pygpt_net-2.6.14.dist-info → pygpt_net-2.6.16.dist-info}/RECORD +57 -57
- {pygpt_net-2.6.14.dist-info → pygpt_net-2.6.16.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.14.dist-info → pygpt_net-2.6.16.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.14.dist-info → pygpt_net-2.6.16.dist-info}/entry_points.txt +0 -0
pygpt_net/core/render/base.py
CHANGED
|
@@ -78,6 +78,15 @@ class Renderer(BaseRenderer):
|
|
|
78
78
|
if pid is not None:
|
|
79
79
|
self.pids[pid] = PidData(pid, meta)
|
|
80
80
|
|
|
81
|
+
def get_pid_data(self, pid: int):
|
|
82
|
+
"""
|
|
83
|
+
Get PID data for given PID
|
|
84
|
+
|
|
85
|
+
:param pid: PID
|
|
86
|
+
"""
|
|
87
|
+
if pid in self.pids:
|
|
88
|
+
return self.pids[pid]
|
|
89
|
+
|
|
81
90
|
def begin(
|
|
82
91
|
self,
|
|
83
92
|
meta: CtxMeta,
|
|
@@ -81,6 +81,15 @@ class Renderer(BaseRenderer):
|
|
|
81
81
|
if pid is not None:
|
|
82
82
|
self.pids[pid] = PidData(pid, meta)
|
|
83
83
|
|
|
84
|
+
def get_pid_data(self, pid: int):
|
|
85
|
+
"""
|
|
86
|
+
Get PID data for given PID
|
|
87
|
+
|
|
88
|
+
:param pid: PID
|
|
89
|
+
"""
|
|
90
|
+
if pid in self.pids:
|
|
91
|
+
return self.pids[pid]
|
|
92
|
+
|
|
84
93
|
def begin(
|
|
85
94
|
self,
|
|
86
95
|
meta: CtxMeta,
|
|
@@ -151,6 +151,15 @@ class Renderer(BaseRenderer):
|
|
|
151
151
|
if pid is not None:
|
|
152
152
|
self.pids[pid] = PidData(pid, meta)
|
|
153
153
|
|
|
154
|
+
def get_pid_data(self, pid: int):
|
|
155
|
+
"""
|
|
156
|
+
Get PID data for given PID
|
|
157
|
+
|
|
158
|
+
:param pid: PID
|
|
159
|
+
"""
|
|
160
|
+
if pid in self.pids:
|
|
161
|
+
return self.pids[pid]
|
|
162
|
+
|
|
154
163
|
def init(self, pid: Optional[int]):
|
|
155
164
|
"""
|
|
156
165
|
Initialize renderer
|
|
@@ -653,7 +662,7 @@ class Renderer(BaseRenderer):
|
|
|
653
662
|
return
|
|
654
663
|
|
|
655
664
|
if begin: # prepare name and avatar header only at the beginning to avoid unnecessary checks
|
|
656
|
-
pctx.header = self.get_name_header(ctx)
|
|
665
|
+
pctx.header = self.get_name_header(ctx, stream=True)
|
|
657
666
|
self.update_names(meta, ctx)
|
|
658
667
|
|
|
659
668
|
name_header_str = pctx.header
|
|
@@ -1328,11 +1337,12 @@ class Renderer(BaseRenderer):
|
|
|
1328
1337
|
|
|
1329
1338
|
return f"<div class='msg-box msg-bot' id='{msg_id}'>{name_header}<div class='msg'>{html}{spinner}<div class='msg-tool-extra'>{tool_extra}</div><div class='tool-output' style='{output_class}'><span class='toggle-cmd-output' onclick='toggleToolOutput({ctx.id});' title='{trans('action.cmd.expand')}' role='button'><img src='{self._file_prefix}{self._icon_expand}' width='25' height='25' valign='middle'></span><div class='content' style='display:none'>{tool_output}</div></div><div class='msg-extra'>{extra}</div>{footer}{debug}</div></div>"
|
|
1330
1339
|
|
|
1331
|
-
def get_name_header(self, ctx: CtxItem) -> str:
|
|
1340
|
+
def get_name_header(self, ctx: CtxItem, stream: bool = False) -> str:
|
|
1332
1341
|
"""
|
|
1333
1342
|
Get name header for the bot
|
|
1334
1343
|
|
|
1335
1344
|
:param ctx: CtxItem instance
|
|
1345
|
+
:param stream: True if it is a stream
|
|
1336
1346
|
:return: HTML name header
|
|
1337
1347
|
"""
|
|
1338
1348
|
meta = ctx.meta
|
|
@@ -1360,7 +1370,11 @@ class Renderer(BaseRenderer):
|
|
|
1360
1370
|
|
|
1361
1371
|
if not output_name and not avatar_html:
|
|
1362
1372
|
return ""
|
|
1363
|
-
|
|
1373
|
+
|
|
1374
|
+
if stream:
|
|
1375
|
+
return f"{avatar_html}{output_name}"
|
|
1376
|
+
else:
|
|
1377
|
+
return f"<div class=\"name-header name-bot\">{avatar_html}{output_name}</div>"
|
|
1364
1378
|
|
|
1365
1379
|
def flush_output(
|
|
1366
1380
|
self,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"__meta__": {
|
|
3
|
-
"version": "2.6.
|
|
4
|
-
"app.version": "2.6.
|
|
5
|
-
"updated_at": "2025-08-
|
|
3
|
+
"version": "2.6.16",
|
|
4
|
+
"app.version": "2.6.16",
|
|
5
|
+
"updated_at": "2025-08-20T00:00:00"
|
|
6
6
|
},
|
|
7
7
|
"access.audio.event.speech": false,
|
|
8
8
|
"access.audio.event.speech.disabled": [],
|
|
@@ -176,11 +176,11 @@
|
|
|
176
176
|
"download.dir": "download",
|
|
177
177
|
"experts.func_call.native": false,
|
|
178
178
|
"experts.mode": "chat",
|
|
179
|
-
"experts.use_agent":
|
|
179
|
+
"experts.use_agent": true,
|
|
180
180
|
"experts.api_use_responses": false,
|
|
181
181
|
"experts.internal.api_use_responses": false,
|
|
182
|
-
"font_size":
|
|
183
|
-
"font_size.input":
|
|
182
|
+
"font_size": 14,
|
|
183
|
+
"font_size.input": 14,
|
|
184
184
|
"font_size.ctx": 12,
|
|
185
185
|
"font_size.toolbox": 12,
|
|
186
186
|
"func_call.native": true,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"__meta__": {
|
|
3
|
-
"version": "2.6.
|
|
4
|
-
"app.version": "2.6.
|
|
5
|
-
"updated_at": "2025-08-
|
|
3
|
+
"version": "2.6.16",
|
|
4
|
+
"app.version": "2.6.16",
|
|
5
|
+
"updated_at": "2025-08-20T23:07:35"
|
|
6
6
|
},
|
|
7
7
|
"items": {
|
|
8
8
|
"SpeakLeash/bielik-11b-v2.3-instruct:Q4_K_M": {
|
|
@@ -1341,6 +1341,7 @@ status.evaluating = Bitte warten... bewerten...
|
|
|
1341
1341
|
status.finished = Abgeschlossen.
|
|
1342
1342
|
status.img.generated = Bild wurde generiert
|
|
1343
1343
|
status.img.saved = Bild gespeichert
|
|
1344
|
+
status.loading = Laden... Bitte warten
|
|
1344
1345
|
status.preset.cleared = Voreinstellung gelöscht
|
|
1345
1346
|
status.preset.deleted = Voreinstellung gelöscht
|
|
1346
1347
|
status.preset.duplicated = Voreinstellung dupliziert
|
|
@@ -1147,8 +1147,8 @@ settings.experts.internal.api_use_responses = Use Responses API in Experts (slav
|
|
|
1147
1147
|
settings.experts.internal.api_use_responses.desc = Use Responses API instead of ChatCompletions API for Expert instances (slave models). OpenAI models only.
|
|
1148
1148
|
settings.experts.mode = Sub-mode for experts
|
|
1149
1149
|
settings.experts.mode.desc = Sub-mode to use for Experts
|
|
1150
|
-
settings.experts.use_agent = Use
|
|
1151
|
-
settings.experts.use_agent.desc = If enabled, expert will use the
|
|
1150
|
+
settings.experts.use_agent = Use agent for expert reasoning
|
|
1151
|
+
settings.experts.use_agent.desc = If enabled, expert will use the agent when generating response and calling tools.
|
|
1152
1152
|
settings.font_size = Font size (chat plain-text, notepads)
|
|
1153
1153
|
settings.font_size.ctx = Font size (ctx list)
|
|
1154
1154
|
settings.font_size.input = Font size (input)
|
|
@@ -1353,6 +1353,7 @@ status.evaluating = Please wait... evaluating...
|
|
|
1353
1353
|
status.finished = Finished.
|
|
1354
1354
|
status.img.generated = Image has been generated.
|
|
1355
1355
|
status.img.saved = Image has been saved.
|
|
1356
|
+
status.loading = Loading... Please wait
|
|
1356
1357
|
status.preset.cleared = Preset has been cleared.
|
|
1357
1358
|
status.preset.deleted = Preset has been deleted.
|
|
1358
1359
|
status.preset.duplicated = Preset has been duplicated.
|
|
@@ -1342,6 +1342,7 @@ status.evaluating = Por favor espera... evaluando...
|
|
|
1342
1342
|
status.finished = Terminado.
|
|
1343
1343
|
status.img.generated = La imagen ha sido generada
|
|
1344
1344
|
status.img.saved = Imagen guardada
|
|
1345
|
+
status.loading = Cargando... Por favor, espera
|
|
1345
1346
|
status.preset.cleared = Ajuste preestablecido limpiado
|
|
1346
1347
|
status.preset.deleted = Ajuste preestablecido eliminado
|
|
1347
1348
|
status.preset.duplicated = Ajuste preestablecido duplicado
|
|
@@ -1341,6 +1341,7 @@ status.evaluating = Veuillez patienter... évaluation en cours...
|
|
|
1341
1341
|
status.finished = Terminé.
|
|
1342
1342
|
status.img.generated = L'image a été générée.
|
|
1343
1343
|
status.img.saved = Image sauvegardée
|
|
1344
|
+
status.loading = Chargement... Veuillez patienter
|
|
1344
1345
|
status.preset.cleared = Préréglage effacé
|
|
1345
1346
|
status.preset.deleted = Préréglage supprimé
|
|
1346
1347
|
status.preset.duplicated = Préréglage dupliqué
|
|
@@ -1341,6 +1341,7 @@ status.evaluating = Attendere prego... valutazione in corso...
|
|
|
1341
1341
|
status.finished = Finito.
|
|
1342
1342
|
status.img.generated = L'immagine è stata generata.
|
|
1343
1343
|
status.img.saved = Immagine salvata.
|
|
1344
|
+
status.loading = Caricamento... Attendere prego
|
|
1344
1345
|
status.preset.cleared = Preset cancellato.
|
|
1345
1346
|
status.preset.deleted = Preset cancellato.
|
|
1346
1347
|
status.preset.duplicated = Preset duplicato.
|
|
@@ -1007,7 +1007,7 @@ settings.agent.func_call.native.desc = Jeśli włączone, aplikacja będzie uży
|
|
|
1007
1007
|
settings.agent.goal.notify = Wyświetl powiadomienie w zasobniku systemowym, gdy cel zostanie osiągnięty.
|
|
1008
1008
|
settings.agent.idx = Indeks
|
|
1009
1009
|
settings.agent.idx.auto_retrieve = Automatyczne pobieranie dodatkowego kontekstu z RAG
|
|
1010
|
-
settings.agent.idx.auto_retrieve.desc = Automatyczne pobieranie dodatkowego kontekstu z RAG na początku, jeśli został podany indeks.
|
|
1010
|
+
settings.agent.idx.auto_retrieve.desc = Automatyczne pobieranie dodatkowego kontekstu z RAG na początku, jeśli został podany indeks.
|
|
1011
1011
|
settings.agent.idx.desc = Tylko jeśli tryb wewnętrzny to llama_index (Czat z plikami), wybierz indeks do użycia w trybach Agenta i Experta
|
|
1012
1012
|
settings.agent.llama.append_eval = Dodaj i porównaj poprzedni prompt oceny w następnej ocenie
|
|
1013
1013
|
settings.agent.llama.append_eval.desc = Jeśli włączone, poprzedni prompt ulepszenia będzie sprawdzany w kolejnej ewaluacji w pętli
|
|
@@ -1344,6 +1344,7 @@ status.evaluating = Proszę czekać... ocena w toku...
|
|
|
1344
1344
|
status.finished = Zakończono.
|
|
1345
1345
|
status.img.generated = Obraz został wygenerowany.
|
|
1346
1346
|
status.img.saved = Obraz został zapisany
|
|
1347
|
+
status.loading = Ładowanie... Proszę czekać
|
|
1347
1348
|
status.preset.cleared = Preset wyczyszczony
|
|
1348
1349
|
status.preset.deleted = Preset usunięty
|
|
1349
1350
|
status.preset.duplicated = Preset skopiowany
|
|
@@ -1341,6 +1341,7 @@ status.evaluating = Будь ласка, зачекайте... оцінюван
|
|
|
1341
1341
|
status.finished = Завершено.
|
|
1342
1342
|
status.img.generated = Зображення було згенеровано.
|
|
1343
1343
|
status.img.saved = Зображення збережено
|
|
1344
|
+
status.loading = Завантаження... Будь ласка, зачекайте
|
|
1344
1345
|
status.preset.cleared = Пресет очищено
|
|
1345
1346
|
status.preset.deleted = Пресет видалено
|
|
1346
1347
|
status.preset.duplicated = Пресет дубльовано
|
|
@@ -1341,6 +1341,7 @@ status.evaluating = 请稍候... 评估中...
|
|
|
1341
1341
|
status.finished = 完成。
|
|
1342
1342
|
status.img.generated = 图像已生成。
|
|
1343
1343
|
status.img.saved = 图像已保存。
|
|
1344
|
+
status.loading = 加载中... 请稍候
|
|
1344
1345
|
status.preset.cleared = 预设已清除。
|
|
1345
1346
|
status.preset.deleted = 预设已删除。
|
|
1346
1347
|
status.preset.duplicated = 预设已复制。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[LOCALE]
|
|
2
2
|
plugin.description = Integriert die DALL-E 3 Bildgenerierung mit jedem Chat und Modus. Einfach aktivieren und im Chatmodus nach einem Bild fragen, unter Verwendung des Standardmodells wie GPT-4. Das Plugin erfordert nicht, dass die Option "Befehle ausführen" aktiviert ist.
|
|
3
|
-
plugin.name =
|
|
3
|
+
plugin.name = Bildgenerierung (inline)
|
|
4
4
|
prompt.description = Prompt verwendet, um im Hintergrund eine Abfrage für DALL-E zu generieren.
|
|
5
5
|
prompt.label = Prompt
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
model.description = The model used for generating images; default is "dall-e-3".
|
|
3
3
|
model.label = Model
|
|
4
4
|
plugin.description = Integrates DALL-E 3 image generation with any chat and mode. Just enable and ask for an image in Chat mode, using the standard model like GPT-4. The plugin does not require the "+ Tools" option to be enabled.
|
|
5
|
-
plugin.name =
|
|
5
|
+
plugin.name = Image Generation (inline)
|
|
6
6
|
prompt.description = Prompt used for generating a query for DALL-E in the background.
|
|
7
7
|
prompt.label = Prompt
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[LOCALE]
|
|
2
2
|
plugin.description = Integra la generación de imágenes de DALL-E 3 con cualquier chat y modo. Solo hay que activarla y pedir una imagen en el Modo Chat, utilizando el modelo estándar como GPT-4. El plugin no requiere que la opción "Ejecutar comandos" esté habilitada.
|
|
3
|
-
plugin.name =
|
|
3
|
+
plugin.name = Generación de Imágenes (en línea)
|
|
4
4
|
prompt.description = Prompt utilizado para generar una consulta para DALL-E en segundo plano.
|
|
5
5
|
prompt.label = Prompt
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[LOCALE]
|
|
2
2
|
plugin.description = Intègre la génération d'images DALL-E 3 avec n'importe quelle discussion et mode. Il suffit de l'activer et de demander une image en mode Chat, en utilisant le modèle standard comme GPT-4. Le plugin ne nécessite pas que l'option "Exécuter des commandes" soit activée.
|
|
3
|
-
plugin.name =
|
|
3
|
+
plugin.name = Génération d'Images (intégré)
|
|
4
4
|
prompt.description = Prompt utilisé pour générer une requête pour DALL-E en arrière-plan.
|
|
5
5
|
prompt.label = Prompt
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[LOCALE]
|
|
2
2
|
plugin.description = Integra la generazione di immagini DALL-E 3 con qualsiasi chat e modalità. Basta abilitare e chiedere un'immagine in modalità Chat, utilizzando il modello standard come GPT-4. Il plugin non richiede che l'opzione "Esegui comandi" sia abilitata.
|
|
3
|
-
plugin.name =
|
|
3
|
+
plugin.name = Generazione Immagini (in linea)
|
|
4
4
|
prompt.description = Prompt usato per generare una query per DALL-E in background.
|
|
5
5
|
prompt.label = Prompt
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[LOCALE]
|
|
2
2
|
plugin.description = Integruje generowanie obrazów DALL-E 3 z każdą rozmową i trybem. Wystarczy włączyć i poprosić o obraz w trybie czatu, używając standardowego modelu, jak GPT-4. Wtyczka nie wymaga włączenia opcji "Wykonywanie poleceń".
|
|
3
|
-
plugin.name =
|
|
3
|
+
plugin.name = Generowanie Obrazów (inline)
|
|
4
4
|
prompt.description = Prompt użyty do generowania zapytania dla DALL-E w tle.
|
|
5
5
|
prompt.label = Prompt
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[LOCALE]
|
|
2
2
|
plugin.description = Інтегрує генерацію зображень DALL-E 3 з будь-яким чатом і режимом. Просто увімкніть і попросіть зображення в режимі чату, користуючись стандартною моделлю, як GPT-4. Плагін не вимагає увімкнення опції "Виконання команд".
|
|
3
|
-
plugin.name =
|
|
3
|
+
plugin.name = Генерація Зображень (вбудовані)
|
|
4
4
|
prompt.description = Prompt використовується для генерування запиту для DALL-E на задньому плані.
|
|
5
5
|
prompt.label = Prompt
|
|
@@ -8,7 +8,7 @@ cmd.make_screenshot.tooltip = Beispiel-prompt: Mach einen Screenshot und beschre
|
|
|
8
8
|
model.description = Das Modell, das vorübergehend Bildgebungs-Fähigkeiten bereitstellt; standardmäßig ist dies "gpt-4-turbo".
|
|
9
9
|
model.label = Modell
|
|
10
10
|
plugin.description = Integriert Bildgebungs-Fähigkeiten mit jedem Chat-Modus, nicht nur dem Vision-Modus. Wenn das plugin aktiviert ist, wechselt das Modell vorübergehend in den Vision-Modus im Hintergrund, wenn ein Bildanhang oder eine Bildaufnahme bereitgestellt wird.
|
|
11
|
-
plugin.name =
|
|
11
|
+
plugin.name = Vision (inline)
|
|
12
12
|
prompt.description = Der für den Vision-Modus verwendete prompt. Er wird an das aktuelle System-prompt angehängt oder ersetzt es beim Verwenden des Vision-Modells.
|
|
13
13
|
prompt.label = Prompt
|
|
14
14
|
replace_prompt.description = Ersetze das gesamte System-prompt durch ein Vision-prompt anstelle es anzuhängen.
|
|
@@ -8,7 +8,7 @@ cmd.make_screenshot.tooltip = Example prompt: Make a screenshot and describe wha
|
|
|
8
8
|
model.description = The model used to temporarily provide vision capabilities; the default is "gpt-4-turbo".
|
|
9
9
|
model.label = Model
|
|
10
10
|
plugin.description = Integrates vision capabilities with any chat mode, not just Vision mode. When the plugin is enabled, the model temporarily switches to vision in the background when an image attachment or vision capture is provided.
|
|
11
|
-
plugin.name =
|
|
11
|
+
plugin.name = Vision (inline)
|
|
12
12
|
prompt.description = Prompt used for vision mode. It will append to or replace the current system prompt when using the vision model.
|
|
13
13
|
prompt.label = Prompt
|
|
14
14
|
replace_prompt.description = Replace the whole system prompt with a vision prompt instead of appending it to the current prompt.
|
|
@@ -8,7 +8,7 @@ cmd.make_screenshot.tooltip = Ejemplo de prompt: Haz una captura de pantalla y d
|
|
|
8
8
|
model.description = El modelo utilizado temporalmente para proporcionar capacidades visuales; por defecto es "gpt-4-turbo".
|
|
9
9
|
model.label = Modelo
|
|
10
10
|
plugin.description = Integra capacidades visuales con cualquier modo de chat, no solo el modo Vision. Cuando el plugin está habilitado, el modelo cambia temporalmente a visión en segundo plano cuando se proporciona un adjunto de imagen o una captura de visión.
|
|
11
|
-
plugin.name =
|
|
11
|
+
plugin.name = Vision (inline)
|
|
12
12
|
prompt.description = Prompt utilizado para el modo visión. Se añadirá al prompt del sistema actual o lo reemplazará al usar el modelo de visión.
|
|
13
13
|
prompt.label = Prompt
|
|
14
14
|
replace_prompt.description = Reemplaza todo el prompt del sistema con un prompt de visión en lugar de añadirlo al actual.
|
|
@@ -8,7 +8,7 @@ cmd.make_screenshot.tooltip = Exemple de prompt: Fais une capture d'écran et d
|
|
|
8
8
|
model.description = Modèle utilisé pour fournir temporairement des capacités visuelles; par défaut c'est "gpt-4-turbo".
|
|
9
9
|
model.label = Modèle
|
|
10
10
|
plugin.description = Intègre les capacités visuelles avec tout mode de chat, pas seulement le mode Vision. Lorsque le plugin est activé, le modèle passe temporairement à la vision en arrière-plan lorsqu'une pièce jointe d'image ou une capture vision est fournie.
|
|
11
|
-
plugin.name =
|
|
11
|
+
plugin.name = Vision (inline)
|
|
12
12
|
prompt.description = Prompt utilisé pour le mode vision. Il sera ajouté au prompt système actuel ou le remplacera lors de l'utilisation du modèle de vision.
|
|
13
13
|
prompt.label = Prompt
|
|
14
14
|
replace_prompt.description = Remplace tout le prompt système par un prompt de vision au lieu de le rajouter au prompt actuel.
|
|
@@ -8,7 +8,7 @@ cmd.make_screenshot.tooltip = Esempio di prompt: Fai uno screenshot e descrivi c
|
|
|
8
8
|
model.description = Il modello utilizzato temporaneamente per fornire capacità visive; quello predefinito è "gpt-4-turbo".
|
|
9
9
|
model.label = Modello
|
|
10
10
|
plugin.description = Integra le capacità visive con qualsiasi modalità di chat, non solo la modalità Vision. Quando il plugin è abilitato, il modello passa temporaneamente alla visione in background quando viene fornito un allegato immagine o una cattura vision.
|
|
11
|
-
plugin.name =
|
|
11
|
+
plugin.name = Vision (inline)
|
|
12
12
|
prompt.description = Prompt utilizzato per la modalità visione. Sarà aggiunto o sostituirà il prompt di sistema corrente quando si utilizza il modello di visione.
|
|
13
13
|
prompt.label = Prompt
|
|
14
14
|
replace_prompt.description = Sostituisce l'intero prompt di sistema con un prompt di visione invece di aggiungerlo al prompt corrente.
|
|
@@ -8,7 +8,7 @@ cmd.make_screenshot.tooltip = Przykładowy prompt: Zrób zrzut ekranu i opisz co
|
|
|
8
8
|
model.description = Model używany tymczasowo do zapewnienia zdolności wizyjnych; domyślnie jest to "gpt-4-turbo".
|
|
9
9
|
model.label = Model
|
|
10
10
|
plugin.description = Integruje zdolności wizyjne z dowolnym trybem rozmowy, nie tylko trybem Wizji. Gdy wtyczka jest włączona, model tymczasowo przełącza się na wizję w tle, gdy dostarczany jest załącznik graficzny lub przechwycenie obrazu.
|
|
11
|
-
plugin.name =
|
|
11
|
+
plugin.name = Vision (inline)
|
|
12
12
|
prompt.description = Prompt używany w trybie wizji. Będzie dodawać do obecnego promptu systemowego lub zastępować go podczas korzystania z modelu wizji.
|
|
13
13
|
prompt.label = Prompt
|
|
14
14
|
replace_prompt.description = Zastąp cały systemowy prompt promptem wizyjnym zamiast dodawać go do obecnego promptu.
|
|
@@ -8,7 +8,7 @@ cmd.make_screenshot.tooltip = Приклад prompt: Зроби знімок е
|
|
|
8
8
|
model.description = Модель, що тимчасово забезпечує візуальні можливості; за замовчуванням це "gpt-4-turbo".
|
|
9
9
|
model.label = Модель
|
|
10
10
|
plugin.description = Інтегрує візуальні можливості з будь-яким режимом чату, не тільки Vision. Коли plugin увімкненно, модель тимчасово переходить на візуальний режим у фоновому режимі, коли надається вкладення зображення або захоплення візії.
|
|
11
|
-
plugin.name =
|
|
11
|
+
plugin.name = Vision (inline)
|
|
12
12
|
prompt.description = Prompt, який використовується для режиму візії. Він буде доданий до поточного системного prompt або замінить його під час використання моделі візії.
|
|
13
13
|
prompt.label = Prompt
|
|
14
14
|
replace_prompt.description = Замінює весь системний prompt на prompt візії, замість того, щоб додавати його до поточного.
|
|
@@ -8,7 +8,7 @@ cmd.make_screenshot.tooltip = 示例 prompt:截取屏幕截图并描述你看
|
|
|
8
8
|
model.description = 临时用来提供视觉能力的模型;默认为 "gpt-4-turbo"。
|
|
9
9
|
model.label = 模型
|
|
10
10
|
plugin.description = 将视觉能力与非仅限视觉模式的任何聊天模式集成。当 plugin 启用时,当提供图像附件或视觉捕获时,模型临时切换到后台的视觉模式。
|
|
11
|
-
plugin.name =
|
|
11
|
+
plugin.name = Vision (inline)
|
|
12
12
|
prompt.description = 视觉模式使用的 prompt。它将附加到当前系统 prompt 或在使用视觉模型时替换它。
|
|
13
13
|
prompt.label = Prompt
|
|
14
14
|
replace_prompt.description = 用视觉 prompt 替换整个系统 prompt,而不是附加到当前 prompt。
|
pygpt_net/item/ctx.py
CHANGED
|
@@ -13,6 +13,7 @@ import copy
|
|
|
13
13
|
import datetime
|
|
14
14
|
import json
|
|
15
15
|
import time
|
|
16
|
+
from typing import Optional
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
class CtxItem:
|
|
@@ -94,7 +95,7 @@ class CtxItem:
|
|
|
94
95
|
|
|
95
96
|
|
|
96
97
|
@property
|
|
97
|
-
def final_input(self) -> str:
|
|
98
|
+
def final_input(self) -> Optional[str]:
|
|
98
99
|
"""
|
|
99
100
|
Final input
|
|
100
101
|
|
|
@@ -103,11 +104,11 @@ class CtxItem:
|
|
|
103
104
|
if self.input is None:
|
|
104
105
|
return None
|
|
105
106
|
if self.hidden_input:
|
|
106
|
-
return "\n\n".join(self.input, self.hidden_input)
|
|
107
|
+
return "\n\n".join([self.input, self.hidden_input])
|
|
107
108
|
return self.input
|
|
108
109
|
|
|
109
110
|
@property
|
|
110
|
-
def final_output(self) -> str:
|
|
111
|
+
def final_output(self) -> Optional[str]:
|
|
111
112
|
"""
|
|
112
113
|
Final output
|
|
113
114
|
|
|
@@ -116,7 +117,7 @@ class CtxItem:
|
|
|
116
117
|
if self.output is None:
|
|
117
118
|
return None
|
|
118
119
|
if self.hidden_output:
|
|
119
|
-
return "\n\n".join(self.output, self.hidden_output)
|
|
120
|
+
return "\n\n".join([self.output, self.hidden_output])
|
|
120
121
|
return self.output
|
|
121
122
|
|
|
122
123
|
def clear_reply(self):
|
|
@@ -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.08.
|
|
9
|
+
# Updated Date: 2025.08.20 09:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
import json
|
|
@@ -174,14 +174,16 @@ class Plugin(BasePlugin):
|
|
|
174
174
|
prepared_question = response
|
|
175
175
|
return prepared_question
|
|
176
176
|
|
|
177
|
-
def get_from_retrieval(self, query: str) -> str:
|
|
177
|
+
def get_from_retrieval(self, query: str, idx: str = None) -> str:
|
|
178
178
|
"""
|
|
179
179
|
Get response from retrieval
|
|
180
180
|
|
|
181
181
|
:param query: query
|
|
182
|
+
:param idx: index to query, if None then use default index
|
|
182
183
|
:return: response
|
|
183
184
|
"""
|
|
184
|
-
idx
|
|
185
|
+
if idx is None:
|
|
186
|
+
idx = self.get_option_value("idx")
|
|
185
187
|
indexes = idx.split(",")
|
|
186
188
|
response = ""
|
|
187
189
|
for index in indexes:
|
|
@@ -226,16 +228,18 @@ class Plugin(BasePlugin):
|
|
|
226
228
|
prompt += "\nADDITIONAL CONTEXT: " + response
|
|
227
229
|
return prompt
|
|
228
230
|
|
|
229
|
-
def query(self, question: str) -> Tuple[str, list, list]:
|
|
231
|
+
def query(self, question: str, idx: str = None) -> Tuple[str, list, list]:
|
|
230
232
|
"""
|
|
231
233
|
Query Llama-index
|
|
232
234
|
|
|
233
235
|
:param question: question
|
|
236
|
+
:param idx: index to query, if None then use default index
|
|
234
237
|
:return: response, list of document ids, list of metadata
|
|
235
238
|
"""
|
|
236
239
|
doc_ids = []
|
|
237
240
|
metas = []
|
|
238
|
-
idx
|
|
241
|
+
if idx is None:
|
|
242
|
+
idx = self.get_option_value("idx")
|
|
239
243
|
model = self.window.core.models.from_defaults()
|
|
240
244
|
|
|
241
245
|
if self.get_option_value("model_query") is not None:
|
|
@@ -72,9 +72,12 @@ class Worker(BaseWorker):
|
|
|
72
72
|
:return: response item
|
|
73
73
|
"""
|
|
74
74
|
question = self.get_param(item, "query")
|
|
75
|
+
idx = None
|
|
76
|
+
if self.has_param(item, "idx"):
|
|
77
|
+
idx = self.get_param(item, "idx")
|
|
75
78
|
self.status("Please wait... querying: {}...".format(question))
|
|
76
79
|
# at first, try to get from retrieval
|
|
77
|
-
response = self.plugin.get_from_retrieval(question)
|
|
80
|
+
response = self.plugin.get_from_retrieval(question, idx=idx) # get response from retrieval
|
|
78
81
|
if response is not None and response != "":
|
|
79
82
|
self.log("Found using retrieval...")
|
|
80
83
|
context = "ADDITIONAL CONTEXT (response from DB):\n--------------------------------\n" + response
|
|
@@ -83,7 +86,7 @@ class Worker(BaseWorker):
|
|
|
83
86
|
}
|
|
84
87
|
return self.make_response(item, response, extra=extra)
|
|
85
88
|
|
|
86
|
-
content, doc_ids, metas = self.plugin.query(question) # send question to Llama-index
|
|
89
|
+
content, doc_ids, metas = self.plugin.query(question, idx=idx) # send question to Llama-index
|
|
87
90
|
result = content
|
|
88
91
|
context = "ADDITIONAL CONTEXT (response from DB):\n--------------------------------\n" + content
|
|
89
92
|
if doc_ids:
|
|
@@ -34,7 +34,7 @@ class Plugin(BasePlugin):
|
|
|
34
34
|
def __init__(self, *args, **kwargs):
|
|
35
35
|
super(Plugin, self).__init__(*args, **kwargs)
|
|
36
36
|
self.id = "openai_dalle"
|
|
37
|
-
self.name = "
|
|
37
|
+
self.name = "Image generation"
|
|
38
38
|
self.description = "Integrates DALL-E 3 image generation with any chat"
|
|
39
39
|
self.prefix = "DALL-E"
|
|
40
40
|
self.type = [
|
|
@@ -488,8 +488,7 @@ class TextareaField(QTextEdit):
|
|
|
488
488
|
if self.value > self.min_font_size:
|
|
489
489
|
self.value -= 1
|
|
490
490
|
|
|
491
|
-
|
|
492
|
-
self.update_stylesheet(f"font-size: {size_str};")
|
|
491
|
+
self.update_stylesheet(f"QTextEdit {{ font-size: {self.value}px }};")
|
|
493
492
|
event.accept()
|
|
494
493
|
else:
|
|
495
494
|
super(TextareaField, self).wheelEvent(event)
|
pygpt_net/ui/dialog/plugins.py
CHANGED
|
@@ -76,12 +76,14 @@ class Plugins:
|
|
|
76
76
|
self.window.ui.tabs['plugin.settings'] = QTabWidget()
|
|
77
77
|
self.window.ui.tabs['plugin.settings.tabs'] = {}
|
|
78
78
|
|
|
79
|
+
sorted_ids = self.window.core.plugins.get_ids(sort=True)
|
|
80
|
+
|
|
79
81
|
# build plugin settings tabs
|
|
80
|
-
for id in
|
|
82
|
+
for id in sorted_ids:
|
|
81
83
|
content_tabs = {}
|
|
82
84
|
scroll_tabs = {}
|
|
83
85
|
|
|
84
|
-
plugin = self.window.core.plugins.
|
|
86
|
+
plugin = self.window.core.plugins.get(id)
|
|
85
87
|
parent_id = "plugin." + id
|
|
86
88
|
|
|
87
89
|
# create plugin options entry if not exists
|
|
@@ -231,8 +233,8 @@ class Plugins:
|
|
|
231
233
|
)
|
|
232
234
|
|
|
233
235
|
data = {}
|
|
234
|
-
for plugin_id in
|
|
235
|
-
plugin = self.window.core.plugins.
|
|
236
|
+
for plugin_id in sorted_ids:
|
|
237
|
+
plugin = self.window.core.plugins.get(plugin_id)
|
|
236
238
|
data[plugin_id] = plugin
|
|
237
239
|
|
|
238
240
|
# plugins list
|
|
@@ -155,8 +155,7 @@ class BaseCodeEditor(QTextEdit):
|
|
|
155
155
|
if self.value > self.min_font_size:
|
|
156
156
|
self.value -= 1
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
self.update_stylesheet(f"font-size: {size_str};")
|
|
158
|
+
self.update_stylesheet(f"QTextEdit {{ font-size: {self.value}px }};")
|
|
160
159
|
event.accept()
|
|
161
160
|
else:
|
|
162
161
|
super(BaseCodeEditor, self).wheelEvent(event)
|