pygpt-net 2.6.8__py3-none-any.whl → 2.6.10__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/app.py +4 -0
- pygpt_net/controller/ctx/common.py +9 -3
- pygpt_net/controller/ctx/ctx.py +19 -17
- pygpt_net/controller/kernel/kernel.py +1 -2
- pygpt_net/core/agents/runner.py +19 -0
- pygpt_net/core/agents/tools.py +93 -52
- pygpt_net/core/render/web/body.py +11 -33
- pygpt_net/core/render/web/renderer.py +52 -79
- pygpt_net/data/config/config.json +4 -3
- pygpt_net/data/config/models.json +3 -3
- pygpt_net/data/config/presets/agent_openai_supervisor.json +54 -0
- pygpt_net/data/config/presets/agent_supervisor.json +52 -0
- pygpt_net/data/config/settings.json +14 -0
- pygpt_net/data/locale/locale.de.ini +2 -0
- pygpt_net/data/locale/locale.en.ini +2 -0
- pygpt_net/data/locale/locale.es.ini +2 -0
- pygpt_net/data/locale/locale.fr.ini +2 -0
- pygpt_net/data/locale/locale.it.ini +2 -0
- pygpt_net/data/locale/locale.pl.ini +3 -1
- pygpt_net/data/locale/locale.uk.ini +2 -0
- pygpt_net/data/locale/locale.zh.ini +2 -0
- pygpt_net/plugin/google/config.py +306 -1
- pygpt_net/plugin/google/plugin.py +22 -0
- pygpt_net/plugin/google/worker.py +579 -3
- pygpt_net/provider/agents/llama_index/supervisor_workflow.py +116 -0
- pygpt_net/provider/agents/llama_index/workflow/supervisor.py +303 -0
- pygpt_net/provider/agents/openai/supervisor.py +361 -0
- pygpt_net/provider/core/config/patch.py +11 -0
- pygpt_net/provider/core/preset/patch.py +18 -0
- pygpt_net/ui/main.py +1 -1
- pygpt_net/ui/widget/lists/context.py +10 -1
- pygpt_net/ui/widget/textarea/web.py +47 -4
- {pygpt_net-2.6.8.dist-info → pygpt_net-2.6.10.dist-info}/METADATA +93 -29
- {pygpt_net-2.6.8.dist-info → pygpt_net-2.6.10.dist-info}/RECORD +39 -34
- {pygpt_net-2.6.8.dist-info → pygpt_net-2.6.10.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.8.dist-info → pygpt_net-2.6.10.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.8.dist-info → pygpt_net-2.6.10.dist-info}/entry_points.txt +0 -0
|
@@ -13,7 +13,7 @@ import json
|
|
|
13
13
|
import os
|
|
14
14
|
import re
|
|
15
15
|
from datetime import datetime
|
|
16
|
-
from typing import Optional, List
|
|
16
|
+
from typing import Optional, List, Any
|
|
17
17
|
|
|
18
18
|
from pygpt_net.core.render.base import BaseRenderer
|
|
19
19
|
from pygpt_net.core.text.utils import has_unclosed_code_tag
|
|
@@ -159,6 +159,15 @@ class Renderer(BaseRenderer):
|
|
|
159
159
|
else:
|
|
160
160
|
self.clear_chunks(pid)
|
|
161
161
|
|
|
162
|
+
def to_json(self, data: Any) -> str:
|
|
163
|
+
"""
|
|
164
|
+
Convert data to JSON object
|
|
165
|
+
|
|
166
|
+
:param data: data to convert
|
|
167
|
+
:return: JSON object or None
|
|
168
|
+
"""
|
|
169
|
+
return json.dumps(data, ensure_ascii=False, separators=(',', ':'))
|
|
170
|
+
|
|
162
171
|
def state_changed(
|
|
163
172
|
self,
|
|
164
173
|
state: str,
|
|
@@ -510,6 +519,15 @@ class Renderer(BaseRenderer):
|
|
|
510
519
|
text_chunk = "".join(("\n", text_chunk)) # add newline to chunk
|
|
511
520
|
|
|
512
521
|
self.prev_chunk_replace = replace_bool
|
|
522
|
+
|
|
523
|
+
# hide loading spinner if it is the beginning of the text
|
|
524
|
+
if begin:
|
|
525
|
+
try:
|
|
526
|
+
self.get_output_node(meta).page().runJavaScript("hideLoading();")
|
|
527
|
+
except Exception as e:
|
|
528
|
+
pass
|
|
529
|
+
|
|
530
|
+
# emit chunk to output node
|
|
513
531
|
try:
|
|
514
532
|
self.get_output_node(meta).page().bridge.chunk.emit(
|
|
515
533
|
name_header_str or "",
|
|
@@ -566,10 +584,10 @@ class Renderer(BaseRenderer):
|
|
|
566
584
|
|
|
567
585
|
pid = self.get_or_create_pid(meta)
|
|
568
586
|
self.clear_chunks_input(pid)
|
|
569
|
-
chunk = self.helpers.format_chunk(text_chunk)
|
|
570
|
-
escaped_chunk = json.dumps(chunk)
|
|
571
587
|
try:
|
|
572
|
-
self.get_output_node(meta).page().runJavaScript(
|
|
588
|
+
self.get_output_node(meta).page().runJavaScript(
|
|
589
|
+
f"appendToInput({self.to_json(self.helpers.format_chunk(text_chunk))});"
|
|
590
|
+
)
|
|
573
591
|
except Exception as e:
|
|
574
592
|
pass
|
|
575
593
|
|
|
@@ -610,11 +628,10 @@ class Renderer(BaseRenderer):
|
|
|
610
628
|
to_append = self.pids[pid].live_buffer
|
|
611
629
|
if has_unclosed_code_tag(self.pids[pid].live_buffer):
|
|
612
630
|
to_append += "\n```"
|
|
613
|
-
html = self.parser.parse(to_append)
|
|
614
|
-
escaped_chunk = json.dumps(html)
|
|
615
631
|
try:
|
|
616
632
|
self.get_output_node(meta).page().runJavaScript(
|
|
617
|
-
f"replaceLive({
|
|
633
|
+
f"replaceLive({self.to_json(self.parser.parse(to_append))});"
|
|
634
|
+
)
|
|
618
635
|
except Exception as e:
|
|
619
636
|
pass
|
|
620
637
|
|
|
@@ -629,7 +646,7 @@ class Renderer(BaseRenderer):
|
|
|
629
646
|
return
|
|
630
647
|
pid = self.get_or_create_pid(meta)
|
|
631
648
|
if not self.pids[pid].loaded:
|
|
632
|
-
js = "var element = document.getElementById('_append_live_');if (element) { element.
|
|
649
|
+
js = "var element = document.getElementById('_append_live_');if (element) { element.replaceChildren(); }"
|
|
633
650
|
else:
|
|
634
651
|
js = "clearLive();"
|
|
635
652
|
try:
|
|
@@ -806,9 +823,8 @@ class Renderer(BaseRenderer):
|
|
|
806
823
|
if footer:
|
|
807
824
|
self.append(pid, html)
|
|
808
825
|
else:
|
|
809
|
-
escaped_html = json.dumps(html)
|
|
810
826
|
try:
|
|
811
|
-
self.get_output_node(meta).page().runJavaScript(f"appendExtra('{ctx.id}',{
|
|
827
|
+
self.get_output_node(meta).page().runJavaScript(f"appendExtra('{ctx.id}',{self.to_json(html)});")
|
|
812
828
|
except Exception as e:
|
|
813
829
|
pass
|
|
814
830
|
|
|
@@ -918,7 +934,7 @@ class Renderer(BaseRenderer):
|
|
|
918
934
|
if pid is None:
|
|
919
935
|
return
|
|
920
936
|
if not self.pids[pid].loaded:
|
|
921
|
-
js = "var element = document.getElementById('_append_input_');if (element) { element.
|
|
937
|
+
js = "var element = document.getElementById('_append_input_');if (element) { element.replaceChildren(); }"
|
|
922
938
|
else:
|
|
923
939
|
js = "clearInput();"
|
|
924
940
|
try:
|
|
@@ -937,7 +953,7 @@ class Renderer(BaseRenderer):
|
|
|
937
953
|
"""
|
|
938
954
|
self.prev_chunk_replace = False
|
|
939
955
|
if not self.pids[pid].loaded:
|
|
940
|
-
js = "var element = document.getElementById('_append_output_');if (element) { element.
|
|
956
|
+
js = "var element = document.getElementById('_append_output_');if (element) { element.replaceChildren(); }"
|
|
941
957
|
else:
|
|
942
958
|
js = "clearOutput();"
|
|
943
959
|
try:
|
|
@@ -955,7 +971,7 @@ class Renderer(BaseRenderer):
|
|
|
955
971
|
:pid: context PID
|
|
956
972
|
"""
|
|
957
973
|
if not self.pids[pid].loaded:
|
|
958
|
-
js = "var element = document.getElementById('_nodes_');if (element) { element.
|
|
974
|
+
js = "var element = document.getElementById('_nodes_');if (element) { element.replaceChildren(); }"
|
|
959
975
|
else:
|
|
960
976
|
js = "clearNodes();"
|
|
961
977
|
try:
|
|
@@ -1043,18 +1059,8 @@ class Renderer(BaseRenderer):
|
|
|
1043
1059
|
if ctx.extra is not None and "footer" in ctx.extra:
|
|
1044
1060
|
extra = ctx.extra["footer"]
|
|
1045
1061
|
extra_style = "display:block;"
|
|
1046
|
-
html = (
|
|
1047
|
-
f'<div class="msg-box msg-user" id="{msg_id}">'
|
|
1048
|
-
f'<div class="name-header name-user">{name}</div>'
|
|
1049
|
-
f'<div class="msg">'
|
|
1050
|
-
f'{html}'
|
|
1051
|
-
f'<div class="msg-extra" style="{extra_style}">{extra}</div>'
|
|
1052
|
-
f'{debug}'
|
|
1053
|
-
f'</div>'
|
|
1054
|
-
f'</div>'
|
|
1055
|
-
)
|
|
1056
1062
|
|
|
1057
|
-
return html
|
|
1063
|
+
return f'<div class="msg-box msg-user" id="{msg_id}"><div class="name-header name-user">{name}</div><div class="msg">{html}<div class="msg-extra" style="{extra_style}">{extra}</div>{debug}</div></div>'
|
|
1058
1064
|
|
|
1059
1065
|
def prepare_node_output(
|
|
1060
1066
|
self,
|
|
@@ -1091,11 +1097,6 @@ class Renderer(BaseRenderer):
|
|
|
1091
1097
|
tool_output = ""
|
|
1092
1098
|
spinner = ""
|
|
1093
1099
|
output_class = "display:none"
|
|
1094
|
-
cmd_icon = f'<img src="{self._file_prefix}{self._icon_expand}" width="25" height="25" valign="middle">'
|
|
1095
|
-
expand_btn = (
|
|
1096
|
-
f"<span class='toggle-cmd-output' onclick='toggleToolOutput({ctx.id});' title='{trans('action.cmd.expand')}' "
|
|
1097
|
-
f"role='button'>{cmd_icon}</span>"
|
|
1098
|
-
)
|
|
1099
1100
|
|
|
1100
1101
|
if is_cmd:
|
|
1101
1102
|
if ctx.results is not None and len(ctx.results) > 0 \
|
|
@@ -1118,42 +1119,13 @@ class Renderer(BaseRenderer):
|
|
|
1118
1119
|
or out.rstrip().endswith(('}</tool>', '}</tool>'))
|
|
1119
1120
|
):
|
|
1120
1121
|
spinner_class = "" if ctx.live else "display:none"
|
|
1121
|
-
spinner =
|
|
1122
|
-
f'<span class="spinner" style="{spinner_class}">'
|
|
1123
|
-
f'<img src="{self._file_prefix}{self._icon_sync}" width="30" height="30" '
|
|
1124
|
-
f'class="loading"></span>'
|
|
1125
|
-
)
|
|
1126
|
-
|
|
1127
|
-
html_tools = (
|
|
1128
|
-
f'<div class="tool-output" style="{output_class}">' +
|
|
1129
|
-
expand_btn +
|
|
1130
|
-
'<div class="content" style="display:none">' +
|
|
1131
|
-
tool_output +
|
|
1132
|
-
'</div></div>'
|
|
1133
|
-
)
|
|
1134
|
-
tool_extra = self.body.prepare_tool_extra(ctx)
|
|
1135
|
-
|
|
1136
|
-
debug = ""
|
|
1137
|
-
if self.is_debug():
|
|
1138
|
-
debug = self.append_debug(ctx, pid, "output")
|
|
1122
|
+
spinner = f"<span class=\"spinner\" style=\"{spinner_class}\"><img src=\"{self._file_prefix}{self._icon_sync}\" width=\"30\" height=\"30\" class=\"loading\"></span>"
|
|
1139
1123
|
|
|
1124
|
+
tool_extra = self.body.prepare_tool_extra(ctx)
|
|
1125
|
+
debug = self.append_debug(ctx, pid, "output") if self.is_debug() else ""
|
|
1140
1126
|
name_header = self.get_name_header(ctx)
|
|
1141
|
-
html = (
|
|
1142
|
-
f'<div class="msg-box msg-bot" id="{msg_id}">' +
|
|
1143
|
-
name_header +
|
|
1144
|
-
'<div class="msg">' +
|
|
1145
|
-
f'{html}' +
|
|
1146
|
-
f'{spinner}' +
|
|
1147
|
-
f'<div class="msg-tool-extra">{tool_extra}</div>' +
|
|
1148
|
-
f'{html_tools}' +
|
|
1149
|
-
f'<div class="msg-extra">{extra}</div>' +
|
|
1150
|
-
f'{footer}' +
|
|
1151
|
-
f'{debug}' +
|
|
1152
|
-
'</div>' +
|
|
1153
|
-
'</div>'
|
|
1154
|
-
)
|
|
1155
1127
|
|
|
1156
|
-
return html
|
|
1128
|
+
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>"
|
|
1157
1129
|
|
|
1158
1130
|
def get_name_header(self, ctx: CtxItem) -> str:
|
|
1159
1131
|
"""
|
|
@@ -1200,10 +1172,10 @@ class Renderer(BaseRenderer):
|
|
|
1200
1172
|
:param pid: context PID
|
|
1201
1173
|
:param html: HTML code
|
|
1202
1174
|
"""
|
|
1203
|
-
escaped_html = json.dumps(html)
|
|
1204
1175
|
try:
|
|
1205
|
-
|
|
1206
|
-
|
|
1176
|
+
self.get_output_node_by_pid(pid).page().runJavaScript(
|
|
1177
|
+
f"if (typeof window.appendNode !== 'undefined') appendNode({self.to_json(html)});"
|
|
1178
|
+
)
|
|
1207
1179
|
except Exception as e:
|
|
1208
1180
|
pass
|
|
1209
1181
|
|
|
@@ -1251,6 +1223,7 @@ class Renderer(BaseRenderer):
|
|
|
1251
1223
|
# self.window.ui.nodes['output'][pid] = new_view
|
|
1252
1224
|
node.resetPage()
|
|
1253
1225
|
node.setHtml(html, baseUrl="file://")
|
|
1226
|
+
self.pids[pid].html = ""
|
|
1254
1227
|
|
|
1255
1228
|
def get_output_node(
|
|
1256
1229
|
self,
|
|
@@ -1291,9 +1264,8 @@ class Renderer(BaseRenderer):
|
|
|
1291
1264
|
:param ctx: context item
|
|
1292
1265
|
"""
|
|
1293
1266
|
try:
|
|
1294
|
-
_id = json.dumps(ctx.id)
|
|
1295
1267
|
self.get_output_node(ctx.meta).page().runJavaScript(
|
|
1296
|
-
f"if (typeof window.removeNode !== 'undefined') removeNode({
|
|
1268
|
+
f"if (typeof window.removeNode !== 'undefined') removeNode({self.to_json(ctx.id)});")
|
|
1297
1269
|
except Exception as e:
|
|
1298
1270
|
pass
|
|
1299
1271
|
|
|
@@ -1304,9 +1276,8 @@ class Renderer(BaseRenderer):
|
|
|
1304
1276
|
:param ctx: context item
|
|
1305
1277
|
"""
|
|
1306
1278
|
try:
|
|
1307
|
-
_id = json.dumps(ctx.id)
|
|
1308
1279
|
self.get_output_node(ctx.meta).page().runJavaScript(
|
|
1309
|
-
f"if (typeof window.removeNodesFromId !== 'undefined') removeNodesFromId({
|
|
1280
|
+
f"if (typeof window.removeNodesFromId !== 'undefined') removeNodesFromId({self.to_json(ctx.id)});")
|
|
1310
1281
|
except Exception as e:
|
|
1311
1282
|
pass
|
|
1312
1283
|
|
|
@@ -1460,7 +1431,7 @@ class Renderer(BaseRenderer):
|
|
|
1460
1431
|
|
|
1461
1432
|
def reload_css(self):
|
|
1462
1433
|
"""Reload CSS - all, global"""
|
|
1463
|
-
to_json =
|
|
1434
|
+
to_json = self.to_json(self.body.prepare_styles())
|
|
1464
1435
|
nodes = self.get_all_nodes()
|
|
1465
1436
|
for pid in self.pids:
|
|
1466
1437
|
if self.pids[pid].loaded:
|
|
@@ -1496,10 +1467,10 @@ class Renderer(BaseRenderer):
|
|
|
1496
1467
|
:param meta: context meta
|
|
1497
1468
|
:param content: content
|
|
1498
1469
|
"""
|
|
1499
|
-
escaped_content = json.dumps(content)
|
|
1500
1470
|
try:
|
|
1501
1471
|
self.get_output_node(meta).page().runJavaScript(
|
|
1502
|
-
f"if (typeof window.appendToolOutput !== 'undefined') appendToolOutput({
|
|
1472
|
+
f"if (typeof window.appendToolOutput !== 'undefined') appendToolOutput({self.to_json(content)});"
|
|
1473
|
+
)
|
|
1503
1474
|
except Exception as e:
|
|
1504
1475
|
pass
|
|
1505
1476
|
|
|
@@ -1514,10 +1485,10 @@ class Renderer(BaseRenderer):
|
|
|
1514
1485
|
:param meta: context meta
|
|
1515
1486
|
:param content: content
|
|
1516
1487
|
"""
|
|
1517
|
-
escaped_content = json.dumps(content)
|
|
1518
1488
|
try:
|
|
1519
1489
|
self.get_output_node(meta).page().runJavaScript(
|
|
1520
|
-
f"if (typeof window.updateToolOutput !== 'undefined') updateToolOutput({
|
|
1490
|
+
f"if (typeof window.updateToolOutput !== 'undefined') updateToolOutput({self.to_json(content)});"
|
|
1491
|
+
)
|
|
1521
1492
|
except Exception as e:
|
|
1522
1493
|
pass
|
|
1523
1494
|
|
|
@@ -1529,7 +1500,8 @@ class Renderer(BaseRenderer):
|
|
|
1529
1500
|
"""
|
|
1530
1501
|
try:
|
|
1531
1502
|
self.get_output_node(meta).page().runJavaScript(
|
|
1532
|
-
f"if (typeof window.clearToolOutput !== 'undefined') clearToolOutput();"
|
|
1503
|
+
f"if (typeof window.clearToolOutput !== 'undefined') clearToolOutput();"
|
|
1504
|
+
)
|
|
1533
1505
|
except Exception as e:
|
|
1534
1506
|
pass
|
|
1535
1507
|
|
|
@@ -1541,7 +1513,8 @@ class Renderer(BaseRenderer):
|
|
|
1541
1513
|
"""
|
|
1542
1514
|
try:
|
|
1543
1515
|
self.get_output_node(meta).page().runJavaScript(
|
|
1544
|
-
f"if (typeof window.beginToolOutput !== 'undefined') beginToolOutput();"
|
|
1516
|
+
f"if (typeof window.beginToolOutput !== 'undefined') beginToolOutput();"
|
|
1517
|
+
)
|
|
1545
1518
|
except Exception as e:
|
|
1546
1519
|
pass
|
|
1547
1520
|
|
|
@@ -1549,7 +1522,8 @@ class Renderer(BaseRenderer):
|
|
|
1549
1522
|
"""End tool output"""
|
|
1550
1523
|
try:
|
|
1551
1524
|
self.get_output_node().page().runJavaScript(
|
|
1552
|
-
f"if (typeof window.endToolOutput !== 'undefined') endToolOutput();"
|
|
1525
|
+
f"if (typeof window.endToolOutput !== 'undefined') endToolOutput();"
|
|
1526
|
+
)
|
|
1553
1527
|
except Exception as e:
|
|
1554
1528
|
pass
|
|
1555
1529
|
|
|
@@ -1568,8 +1542,7 @@ class Renderer(BaseRenderer):
|
|
|
1568
1542
|
"""
|
|
1569
1543
|
if title is None:
|
|
1570
1544
|
title = "debug"
|
|
1571
|
-
|
|
1572
|
-
return "<div class='debug'>" + debug + "</div>"
|
|
1545
|
+
return f"<div class='debug'><b>{title}:</b> pid: {pid}, ctx: {ctx.to_dict()}</div>"
|
|
1573
1546
|
|
|
1574
1547
|
def is_debug(self) -> bool:
|
|
1575
1548
|
"""
|
|
@@ -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.10",
|
|
4
|
+
"app.version": "2.6.10",
|
|
5
|
+
"updated_at": "2025-08-17T00:00:00"
|
|
6
6
|
},
|
|
7
7
|
"access.audio.event.speech": false,
|
|
8
8
|
"access.audio.event.speech.disabled": [],
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"agent.func_call.native": false,
|
|
51
51
|
"agent.goal.notify": false,
|
|
52
52
|
"agent.idx": "base",
|
|
53
|
+
"agent.idx.auto_retrieve": true,
|
|
53
54
|
"agent.iterations": 3,
|
|
54
55
|
"agent.llama.idx": "base",
|
|
55
56
|
"agent.llama.loop.enabled": false,
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"uuid": "a424e13a-b3c2-4cc7-81b5-f74821f47ec3",
|
|
3
|
+
"name": "Supervisor + worker",
|
|
4
|
+
"ai_name": "",
|
|
5
|
+
"ai_avatar": "",
|
|
6
|
+
"ai_personalize": false,
|
|
7
|
+
"user_name": "",
|
|
8
|
+
"prompt": "",
|
|
9
|
+
"chat": false,
|
|
10
|
+
"completion": false,
|
|
11
|
+
"img": false,
|
|
12
|
+
"vision": false,
|
|
13
|
+
"assistant": false,
|
|
14
|
+
"llama_index": false,
|
|
15
|
+
"agent": false,
|
|
16
|
+
"agent_llama": false,
|
|
17
|
+
"agent_openai": true,
|
|
18
|
+
"expert": false,
|
|
19
|
+
"audio": false,
|
|
20
|
+
"research": false,
|
|
21
|
+
"computer": false,
|
|
22
|
+
"temperature": 1.0,
|
|
23
|
+
"filename": "agent_openai_supervisor",
|
|
24
|
+
"model": "gpt-4o",
|
|
25
|
+
"tools": {
|
|
26
|
+
"function": []
|
|
27
|
+
},
|
|
28
|
+
"experts": [],
|
|
29
|
+
"idx": "_",
|
|
30
|
+
"agent_provider": "supervisor",
|
|
31
|
+
"agent_provider_openai": "openai_agent_supervisor",
|
|
32
|
+
"assistant_id": "",
|
|
33
|
+
"enabled": true,
|
|
34
|
+
"description": "",
|
|
35
|
+
"remote_tools": "",
|
|
36
|
+
"extra": {
|
|
37
|
+
"openai_agent_supervisor": {
|
|
38
|
+
"supervisor": {
|
|
39
|
+
"prompt": "\n You are the \u201cSupervisor\u201d (orchestrator). You never use tools directly except the tool that runs the Worker.\n Process:\n - Decompose the user's task into actionable instructions for the Worker.\n - Do NOT pass your conversation history to the Worker. Pass ONLY a concise, self-contained instruction.\n - After each Worker result, evaluate against a clear Definition of Done (DoD). If not met, call the Worker again with a refined instruction.\n - Ask the user only if absolutely necessary. If you must, STOP and output a single JSON with:\n {\"action\":\"ask_user\",\"question\":\"...\",\"reasoning\":\"...\"}\n - When done, output a single JSON:\n {\"action\":\"final\",\"final_answer\":\"...\",\"reasoning\":\"...\"}\n - Otherwise, to run the Worker, call the run_worker tool with a short instruction.\n Respond in the user's language. Keep outputs short and precise.\n "
|
|
40
|
+
},
|
|
41
|
+
"worker": {
|
|
42
|
+
"model": "gpt-4o",
|
|
43
|
+
"prompt": "\n You are the \u201cWorker\u201d. You execute Supervisor instructions strictly, using your tools.\n - Keep your own memory across calls (Worker session).\n - Return a concise result with key evidence/extracts from tools when applicable.\n - Do not ask the user questions directly; if instruction is underspecified, clearly state what is missing.\n Respond in the user's language.\n ",
|
|
44
|
+
"allow_local_tools": true,
|
|
45
|
+
"allow_remote_tools": true
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"__meta__": {
|
|
50
|
+
"version": "2.6.8",
|
|
51
|
+
"app.version": "2.6.8",
|
|
52
|
+
"updated_at": "2025-08-17T03:03:45"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"uuid": "f5dd895c-3be8-4a73-aac9-7a20845e57b2",
|
|
3
|
+
"name": "Supervisor + worker",
|
|
4
|
+
"ai_name": "",
|
|
5
|
+
"ai_avatar": "",
|
|
6
|
+
"ai_personalize": false,
|
|
7
|
+
"user_name": "",
|
|
8
|
+
"prompt": "",
|
|
9
|
+
"chat": false,
|
|
10
|
+
"completion": false,
|
|
11
|
+
"img": false,
|
|
12
|
+
"vision": false,
|
|
13
|
+
"assistant": false,
|
|
14
|
+
"llama_index": false,
|
|
15
|
+
"agent": false,
|
|
16
|
+
"agent_llama": true,
|
|
17
|
+
"agent_openai": false,
|
|
18
|
+
"expert": false,
|
|
19
|
+
"audio": false,
|
|
20
|
+
"research": false,
|
|
21
|
+
"computer": false,
|
|
22
|
+
"temperature": 1.0,
|
|
23
|
+
"filename": "agent_supervisor",
|
|
24
|
+
"model": "gpt-4o",
|
|
25
|
+
"tools": {
|
|
26
|
+
"function": []
|
|
27
|
+
},
|
|
28
|
+
"experts": [],
|
|
29
|
+
"idx": "_",
|
|
30
|
+
"agent_provider": "supervisor",
|
|
31
|
+
"agent_provider_openai": "openai_agent_supervisor",
|
|
32
|
+
"assistant_id": "",
|
|
33
|
+
"enabled": true,
|
|
34
|
+
"description": "",
|
|
35
|
+
"remote_tools": "",
|
|
36
|
+
"extra": {
|
|
37
|
+
"supervisor": {
|
|
38
|
+
"supervisor": {
|
|
39
|
+
"prompt": "\nYou are the \u201cSupervisor\u201d \u2013 the main orchestrator. Do not use tools directly.\nYour tasks:\n- Break down the user's task into steps and create precise instructions for the \u201cWorker\u201d agent.\n- Do not pass your history/memory to the Worker. Only pass minimal, self-sufficient instructions.\n- After each Worker response, assess progress towards the Definition of Done (DoD). If not met \u2013 generate a better instruction.\n- Ask the user only when absolutely necessary. Then stop and return the question.\n- When the task is complete \u2013 return the final answer to the user.\nAlways return only ONE JSON object:\n{\n \"action\": \"task\" | \"final\" | \"ask_user\",\n \"instruction\": \"<Worker's instruction or ''>\",\n \"final_answer\": \"<final answer or ''>\",\n \"question\": \"<user question or ''>\",\n \"reasoning\": \"<brief reasoning and quality control>\",\n \"done_criteria\": \"<list/text of DoD criteria>\"\n}\nEnsure proper JSON (no comments, no trailing commas). Respond in the user's language.\n"
|
|
40
|
+
},
|
|
41
|
+
"worker": {
|
|
42
|
+
"model": "gpt-4o",
|
|
43
|
+
"prompt": "\nYou are the \u201cWorker\u201d \u2013 executor of the Supervisor's instructions. You have your own memory and tools.\n- Execute the Supervisor's instructions precisely and concisely.\n- Use the available tools and return a brief result + relevant data/reasoning.\n- Maintain the working context in your memory (only Worker).\n- Return plain text (not JSON) unless instructed otherwise by the Supervisor.\n- Respond in the user's language.\n"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"__meta__": {
|
|
48
|
+
"version": "2.6.8",
|
|
49
|
+
"app.version": "2.6.8",
|
|
50
|
+
"updated_at": "2025-08-17T03:03:21"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -1972,6 +1972,20 @@
|
|
|
1972
1972
|
"advanced": false,
|
|
1973
1973
|
"tab": "general"
|
|
1974
1974
|
},
|
|
1975
|
+
"agent.idx.auto_retrieve": {
|
|
1976
|
+
"section": "agent",
|
|
1977
|
+
"type": "bool",
|
|
1978
|
+
"slider": false,
|
|
1979
|
+
"label": "settings.agent.idx.auto_retrieve",
|
|
1980
|
+
"description": "settings.agent.idx.auto_retrieve.desc",
|
|
1981
|
+
"value": true,
|
|
1982
|
+
"min": 0,
|
|
1983
|
+
"max": 0,
|
|
1984
|
+
"multiplier": 1,
|
|
1985
|
+
"step": 1,
|
|
1986
|
+
"advanced": false,
|
|
1987
|
+
"tab": "general"
|
|
1988
|
+
},
|
|
1975
1989
|
"agent.mode": {
|
|
1976
1990
|
"section": "agent",
|
|
1977
1991
|
"type": "combo",
|
|
@@ -1003,6 +1003,8 @@ settings.agent.func_call.native = Verwende native API-Funktionsaufrufe
|
|
|
1003
1003
|
settings.agent.func_call.native.desc = Wenn aktiviert, wird die Anwendung native API-Funktionsaufrufe anstelle des internen pygpt-Formats verwenden und Befehle werden nicht verwendet. Nur autonomer Agentenmodus.
|
|
1004
1004
|
settings.agent.goal.notify = Zeige eine Benachrichtigung im Infobereich an, wenn das Ziel erreicht ist.
|
|
1005
1005
|
settings.agent.idx = Index
|
|
1006
|
+
settings.agent.idx.auto_retrieve = Automatisches Abrufen des zusätzlichen Kontexts von RAG
|
|
1007
|
+
settings.agent.idx.auto_retrieve.desc = Automatisches Abrufen des zusätzlichen Kontexts von RAG zu Beginn, wenn der Index bereitgestellt wird.
|
|
1006
1008
|
settings.agent.idx.desc = Nur wenn der interne Modus llama_index ist (Chat mit Dateien), wählen Sie den Index zur Verwendung im Agent- und Expertenmodus
|
|
1007
1009
|
settings.agent.llama.append_eval = Fügen Sie die vorherige Evaluierungs-Prompt zu der nächsten Evaluierungs-Prompt hinzu und vergleichen Sie sie
|
|
1008
1010
|
settings.agent.llama.append_eval.desc = Wenn aktiviert, wird die vorherige Verbesserungs-Prompt in der nächsten Evaluierung in der Schleife überprüft
|
|
@@ -1009,6 +1009,8 @@ settings.agent.func_call.native = Use native API function calls
|
|
|
1009
1009
|
settings.agent.func_call.native.desc = If enabled, the application will use native API function calls instead of the internal pygpt format and the command prompts will not be used. Autonomus agent mode only.
|
|
1010
1010
|
settings.agent.goal.notify = Display a tray notification when the goal is achieved.
|
|
1011
1011
|
settings.agent.idx = Index to use
|
|
1012
|
+
settings.agent.idx.auto_retrieve = Auto retrieve additional context from RAG
|
|
1013
|
+
settings.agent.idx.auto_retrieve.desc = Auto retrieve additional context from RAG at the beginning if the index is provided.
|
|
1012
1014
|
settings.agent.idx.desc = Only if sub-mode is Chat with Files, choose the index to use in Autonomous and Experts modes
|
|
1013
1015
|
settings.agent.llama.append_eval = Append and compare previous evaluation prompt in next evaluation
|
|
1014
1016
|
settings.agent.llama.append_eval.desc = If enabled, previous improvement prompt will be checked in next eval in loop
|
|
@@ -1004,6 +1004,8 @@ settings.agent.func_call.native = Usar llamadas de función API nativas
|
|
|
1004
1004
|
settings.agent.func_call.native.desc = Si está habilitado, la aplicación utilizará llamadas de función API nativas en lugar del formato interno pygpt y los comandos no se utilizarán. Solo modo Agente autónomo.
|
|
1005
1005
|
settings.agent.goal.notify = Mostrar una notificación en la bandeja del sistema cuando se logre el objetivo.
|
|
1006
1006
|
settings.agent.idx = Índice
|
|
1007
|
+
settings.agent.idx.auto_retrieve = Recuperación automática de contexto adicional de RAG
|
|
1008
|
+
settings.agent.idx.auto_retrieve.desc = Recuperación automática de contexto adicional de RAG al principio si se proporciona el índice.
|
|
1007
1009
|
settings.agent.idx.desc = Solo si el modo interno es llama_index (Chat con archivos), elija el índice a utilizar en los modos Agente y Experto
|
|
1008
1010
|
settings.agent.llama.append_eval = Añadir y comparar la evaluación anterior en la próxima evaluación
|
|
1009
1011
|
settings.agent.llama.append_eval.desc = Si está habilitado, se verificará el prompt de mejora anterior en la próxima evaluación en bucle
|
|
@@ -1003,6 +1003,8 @@ settings.agent.func_call.native = Utiliser des appels de fonction API natifs
|
|
|
1003
1003
|
settings.agent.func_call.native.desc = Si activé, l'application utilisera des appels de fonction API natifs au lieu du format interne pygpt et les commandes ne seront pas utilisées. Mode Agent autonome uniquement.
|
|
1004
1004
|
settings.agent.goal.notify = Afficher une notification dans la barre des tâches lorsque l'objectif est atteint.
|
|
1005
1005
|
settings.agent.idx = Index
|
|
1006
|
+
settings.agent.idx.auto_retrieve = Récupération automatique du contexte supplémentaire de RAG
|
|
1007
|
+
settings.agent.idx.auto_retrieve.desc = Récupération automatique du contexte supplémentaire de RAG au début si l'index est fourni.
|
|
1006
1008
|
settings.agent.idx.desc = Seulement si le mode interne est llama_index (Chat avec des fichiers), choisissez l'index à utiliser en modes Agent et Expert
|
|
1007
1009
|
settings.agent.llama.append_eval = Ajouter et comparer l'évaluation précédente dans la prochaine évaluation
|
|
1008
1010
|
settings.agent.llama.append_eval.desc = Si activé, le prompt d'amélioration précédent sera vérifié dans la prochaine évaluation en boucle
|
|
@@ -1003,6 +1003,8 @@ settings.agent.func_call.native = Usa chiamate di funzione API native
|
|
|
1003
1003
|
settings.agent.func_call.native.desc = Se abilitato, l'applicazione utilizzerà chiamate di funzione API native invece del formato interno pygpt e i comandi non saranno utilizzati. Solo modalità Agente autonomo.
|
|
1004
1004
|
settings.agent.goal.notify = Visualizza una notifica nella barra delle applicazioni quando l'obiettivo è raggiunto.
|
|
1005
1005
|
settings.agent.idx = Indice
|
|
1006
|
+
settings.agent.idx.auto_retrieve = Recupero automatico del contesto aggiuntivo da RAG
|
|
1007
|
+
settings.agent.idx.auto_retrieve.desc = Recupero automatico del contesto aggiuntivo da RAG all'inizio, se l'indice è fornito.
|
|
1006
1008
|
settings.agent.idx.desc = Solo se la modalità interna è llama_index (Chat con file), scegli l'indice da utilizzare nelle modalità Agente ed Esperto
|
|
1007
1009
|
settings.agent.llama.append_eval = Aggiungi e confronta il prompt di valutazione precedente nella prossima valutazione
|
|
1008
1010
|
settings.agent.llama.append_eval.desc = Se abilitato, il prompt di miglioramento precedente sarà controllato nella prossima valutazione in loop
|
|
@@ -972,7 +972,7 @@ preset.research = Badania
|
|
|
972
972
|
preset.tab.experts = Eksperci
|
|
973
973
|
preset.tab.general = Ogólne
|
|
974
974
|
preset.tab.personalize = Personalizuj
|
|
975
|
-
preset.tab.remote_tools = Narzędzia zdalne
|
|
975
|
+
preset.tab.remote_tools = Narzędzia zdalne
|
|
976
976
|
preset.temperature = Temperatura
|
|
977
977
|
preset.tool.function = Funkcje
|
|
978
978
|
preset.tool.function.tip.agent_llama = Tip: Funkcje z wtyczek są automatycznie włączane.
|
|
@@ -1006,6 +1006,8 @@ settings.agent.func_call.native = Używaj natywnych wywołań funkcji API
|
|
|
1006
1006
|
settings.agent.func_call.native.desc = Jeśli włączone, aplikacja będzie używać natywnych wywołań funkcji API zamiast wewnętrznego formatu pygpt i polecenia nie będą używane. Tylko tryb Agent autonomiczny.
|
|
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
|
+
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.
|
|
1009
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
|
|
1010
1012
|
settings.agent.llama.append_eval = Dodaj i porównaj poprzedni prompt oceny w następnej ocenie
|
|
1011
1013
|
settings.agent.llama.append_eval.desc = Jeśli włączone, poprzedni prompt ulepszenia będzie sprawdzany w kolejnej ewaluacji w pętli
|
|
@@ -1003,6 +1003,8 @@ settings.agent.func_call.native = Використовувати нативні
|
|
|
1003
1003
|
settings.agent.func_call.native.desc = Якщо увімкнено, додаток буде використовувати нативні виклики функцій API замість внутрішнього формату pygpt і команди не будуть використовуватися. Тільки режим автономного Агента.
|
|
1004
1004
|
settings.agent.goal.notify = Показати сповіщення в системному треї, коли мета досягнута.
|
|
1005
1005
|
settings.agent.idx = Індекс
|
|
1006
|
+
settings.agent.idx.auto_retrieve = Автоматичне отримання додаткового контексту з RAG
|
|
1007
|
+
settings.agent.idx.auto_retrieve.desc = Автоматичне отримання додаткового контексту з RAG на початку, якщо надано індекс.
|
|
1006
1008
|
settings.agent.idx.desc = Тільки якщо внутрішній режим llama_index (Чат з файлами), виберіть індекс для використання у режимах Агента та Експерта
|
|
1007
1009
|
settings.agent.llama.append_eval = Додати та порівняти попередній запит оцінки при наступному оцінюванні
|
|
1008
1010
|
settings.agent.llama.append_eval.desc = Якщо увімкнено, попередній запит на поліпшення буде перевірено в наступній оцінці в циклі
|
|
@@ -1003,6 +1003,8 @@ settings.agent.func_call.native = 使用本地API函数调用
|
|
|
1003
1003
|
settings.agent.func_call.native.desc = 如果启用,应用程序将使用本地API函数调用而不是内部pygpt格式,并且命令将不被使用。仅限自主Agent模式。
|
|
1004
1004
|
settings.agent.goal.notify = 當目標達成時顯示托盤通知。
|
|
1005
1005
|
settings.agent.idx = 要使用的索引
|
|
1006
|
+
settings.agent.idx.auto_retrieve = 自动检索来自RAG的附加上下文
|
|
1007
|
+
settings.agent.idx.auto_retrieve.desc = 如果提供了索引,将在开始时自动检索来自RAG的附加上下文。
|
|
1006
1008
|
settings.agent.idx.desc = 仅当内部模式为 llama_index(文件聊天)时,选择在代理模式和专家模式下使用的索引
|
|
1007
1009
|
settings.agent.llama.append_eval = 在下一次评估中追加并比较先前的评估提示
|
|
1008
1010
|
settings.agent.llama.append_eval.desc = 如果启用,将在下一个循环评估中检查先前的改进提示
|