pygpt-net 2.6.15__py3-none-any.whl → 2.6.17__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/__init__.py +8 -2
- pygpt_net/controller/chat/command.py +18 -6
- pygpt_net/controller/ctx/ctx.py +2 -2
- pygpt_net/controller/mode/mode.py +3 -2
- pygpt_net/controller/plugins/plugins.py +31 -15
- pygpt_net/controller/presets/editor.py +11 -32
- pygpt_net/controller/settings/profile.py +16 -3
- pygpt_net/controller/settings/workdir.py +184 -124
- pygpt_net/controller/theme/theme.py +11 -5
- pygpt_net/core/agents/observer/evaluation.py +3 -14
- pygpt_net/core/agents/runners/llama_workflow.py +7 -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/plain/body.py +10 -19
- pygpt_net/core/render/plain/renderer.py +27 -27
- pygpt_net/data/config/config.json +6 -6
- pygpt_net/data/config/models.json +3 -3
- pygpt_net/data/locale/locale.en.ini +2 -2
- 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/__init__.py +12 -10
- pygpt_net/ui/base/config_dialog.py +15 -10
- pygpt_net/ui/dialog/about.py +26 -18
- pygpt_net/ui/dialog/plugins.py +6 -4
- pygpt_net/ui/dialog/settings.py +75 -87
- pygpt_net/ui/dialog/workdir.py +7 -2
- pygpt_net/ui/main.py +5 -1
- pygpt_net/ui/widget/textarea/editor.py +1 -2
- pygpt_net/ui/widget/textarea/web.py +22 -16
- {pygpt_net-2.6.15.dist-info → pygpt_net-2.6.17.dist-info}/METADATA +26 -14
- {pygpt_net-2.6.15.dist-info → pygpt_net-2.6.17.dist-info}/RECORD +57 -57
- {pygpt_net-2.6.15.dist-info → pygpt_net-2.6.17.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.15.dist-info → pygpt_net-2.6.17.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.15.dist-info → pygpt_net-2.6.17.dist-info}/entry_points.txt +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# GitHub: https://github.com/szczyglis-dev/py-gpt #
|
|
7
7
|
# MIT License #
|
|
8
8
|
# Created By : Marcin Szczygliński #
|
|
9
|
-
# Updated Date: 2025.08.
|
|
9
|
+
# Updated Date: 2025.08.20 09:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
import json
|
|
@@ -53,6 +53,7 @@ class Experts:
|
|
|
53
53
|
self.allowed_cmds = ["expert_call"]
|
|
54
54
|
self.worker = None
|
|
55
55
|
self.last_expert_id = None # last expert id used in call
|
|
56
|
+
self.last_idx = None # last index used in call
|
|
56
57
|
self.master_ctx = None # master meta for expert calls
|
|
57
58
|
|
|
58
59
|
def get_mode(self) -> str:
|
|
@@ -218,6 +219,28 @@ class Experts:
|
|
|
218
219
|
return {}
|
|
219
220
|
return calls
|
|
220
221
|
|
|
222
|
+
def extract_tool_calls(self, ctx: CtxItem):
|
|
223
|
+
"""
|
|
224
|
+
Extract tool calls from expert
|
|
225
|
+
|
|
226
|
+
:param ctx: context item
|
|
227
|
+
"""
|
|
228
|
+
for call in ctx.tool_calls:
|
|
229
|
+
if (call["type"] == "function"
|
|
230
|
+
and "function" in call
|
|
231
|
+
and call["function"]["name"] == "get_context"):
|
|
232
|
+
ctx.force_call = True # force call if get_context tool is used
|
|
233
|
+
ctx.cmds_before = [
|
|
234
|
+
{
|
|
235
|
+
"cmd": "get_context",
|
|
236
|
+
"params": {
|
|
237
|
+
"query": call["function"]["arguments"]["query"],
|
|
238
|
+
"idx": self.last_idx,
|
|
239
|
+
},
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
break
|
|
243
|
+
|
|
221
244
|
def reply(self, ctx: CtxItem):
|
|
222
245
|
"""
|
|
223
246
|
Re-send response from commands to master expert
|
|
@@ -360,6 +383,9 @@ class Experts:
|
|
|
360
383
|
ctx.extra = {}
|
|
361
384
|
ctx.extra["tool_calls"] = ctx.tool_calls
|
|
362
385
|
|
|
386
|
+
# if 'get_context' tool is used then force call, and append idx
|
|
387
|
+
self.extract_tool_calls(ctx) # extract tool calls from ctx
|
|
388
|
+
|
|
363
389
|
self.window.controller.chat.command.handle(ctx, internal=True) # handle cmds sync
|
|
364
390
|
if ctx.reply:
|
|
365
391
|
self.window.update_status("") # clear status
|
|
@@ -385,7 +411,6 @@ class Experts:
|
|
|
385
411
|
|
|
386
412
|
# make copy of ctx for reply, and change input name to expert name
|
|
387
413
|
reply_ctx = CtxItem()
|
|
388
|
-
|
|
389
414
|
reply_ctx.from_dict(ctx.to_dict())
|
|
390
415
|
reply_ctx.meta = master_ctx.meta
|
|
391
416
|
|
|
@@ -523,6 +548,25 @@ class Experts:
|
|
|
523
548
|
]
|
|
524
549
|
return cmds
|
|
525
550
|
|
|
551
|
+
def get_retriever_tool(self) -> Dict[str, str]:
|
|
552
|
+
"""
|
|
553
|
+
Get retriever tool for additional context retrieval
|
|
554
|
+
|
|
555
|
+
:return: retriever tool definition
|
|
556
|
+
"""
|
|
557
|
+
return {
|
|
558
|
+
"cmd": "get_context",
|
|
559
|
+
"instruction": "get additional context for a given query",
|
|
560
|
+
"params": [
|
|
561
|
+
{
|
|
562
|
+
"name": "query",
|
|
563
|
+
"description": "query to retrieve additional context for",
|
|
564
|
+
"required": True,
|
|
565
|
+
"type": "str",
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
}
|
|
569
|
+
|
|
526
570
|
def has_calls(self, ctx: CtxItem) -> bool:
|
|
527
571
|
"""
|
|
528
572
|
Check if context has expert calls
|
|
@@ -653,6 +697,9 @@ class ExpertWorker(QRunnable):
|
|
|
653
697
|
use_index = False
|
|
654
698
|
if db_idx and db_idx != '_':
|
|
655
699
|
use_index = True
|
|
700
|
+
self.window.core.experts.last_idx = db_idx # store last index used in call
|
|
701
|
+
else:
|
|
702
|
+
self.window.core.experts.last_idx = None
|
|
656
703
|
if use_index:
|
|
657
704
|
index, llm = self.window.core.idx.chat.get_index(db_idx, model_data, stream=False)
|
|
658
705
|
else:
|
|
@@ -715,9 +762,16 @@ class ExpertWorker(QRunnable):
|
|
|
715
762
|
return
|
|
716
763
|
else:
|
|
717
764
|
# native func call
|
|
718
|
-
if self.window.core.command.is_native_enabled():
|
|
765
|
+
if self.window.core.command.is_native_enabled(force=False, model=model):
|
|
766
|
+
|
|
767
|
+
# get native functions, without expert_call here
|
|
719
768
|
functions = self.window.core.command.get_functions(master_ctx.id)
|
|
720
|
-
|
|
769
|
+
|
|
770
|
+
# append retrieval tool if index is selected
|
|
771
|
+
if use_index:
|
|
772
|
+
retriever_tool = self.window.core.experts.get_retriever_tool()
|
|
773
|
+
func_list = self.window.core.command.cmds_to_functions([retriever_tool])
|
|
774
|
+
functions.append(func_list[0]) # append only first function
|
|
721
775
|
|
|
722
776
|
# call bridge
|
|
723
777
|
bridge_context = BridgeContext(
|
|
@@ -766,15 +820,7 @@ class ExpertWorker(QRunnable):
|
|
|
766
820
|
self.window.core.ctx.update_item(ctx)
|
|
767
821
|
|
|
768
822
|
ctx.from_previous() # append previous result if exists
|
|
769
|
-
|
|
770
|
-
# tmp switch meta for render purposes
|
|
771
|
-
ctx.meta = master_ctx.meta
|
|
772
|
-
|
|
773
|
-
if use_agent:
|
|
774
|
-
self.signals.output.emit(ctx, mode) # emit output signal, only if final response from agent
|
|
775
|
-
|
|
776
823
|
ctx.clear_reply() # reset results
|
|
777
|
-
ctx.meta = slave # restore before cmd execute
|
|
778
824
|
|
|
779
825
|
if not use_agent:
|
|
780
826
|
ctx.sub_tool_call = True
|
|
@@ -793,7 +839,6 @@ class ExpertWorker(QRunnable):
|
|
|
793
839
|
|
|
794
840
|
# make copy of ctx for reply, and change input name to expert name
|
|
795
841
|
reply_ctx = CtxItem()
|
|
796
|
-
|
|
797
842
|
reply_ctx.from_dict(ctx.to_dict())
|
|
798
843
|
reply_ctx.meta = master_ctx.meta
|
|
799
844
|
|
|
@@ -57,14 +57,25 @@ class Plugins:
|
|
|
57
57
|
"""
|
|
58
58
|
return self.plugins
|
|
59
59
|
|
|
60
|
-
def get_ids(self) -> List[str]:
|
|
60
|
+
def get_ids(self, sort: bool = False) -> List[str]:
|
|
61
61
|
"""
|
|
62
62
|
Get all plugins ids
|
|
63
63
|
|
|
64
|
+
:param sort: if True, return sorted ids
|
|
64
65
|
:return: plugins ids list
|
|
65
66
|
"""
|
|
67
|
+
if sort:
|
|
68
|
+
return self.get_sorted_ids()
|
|
66
69
|
return list(self.plugins.keys())
|
|
67
70
|
|
|
71
|
+
def get_sorted_ids(self) -> List[str]:
|
|
72
|
+
"""
|
|
73
|
+
Get all plugins ids sorted by name
|
|
74
|
+
|
|
75
|
+
:return: sorted plugins ids list
|
|
76
|
+
"""
|
|
77
|
+
return sorted(self.plugins.keys(), key=lambda pid: self.get_name(pid).lower())
|
|
78
|
+
|
|
68
79
|
def get(self, plugin_id: str) -> Optional[BasePlugin]:
|
|
69
80
|
"""
|
|
70
81
|
Get plugin by id
|
|
@@ -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: 2025.08.21 00:00:00 #
|
|
10
10
|
# ================================================== #
|
|
11
11
|
|
|
12
12
|
from typing import Optional, List, Dict
|
|
@@ -40,12 +40,9 @@ class Body:
|
|
|
40
40
|
"""
|
|
41
41
|
num_str = ""
|
|
42
42
|
if num is not None and num_all is not None and num_all > 1:
|
|
43
|
-
num_str = " [{}]"
|
|
43
|
+
num_str = f" [{num}]"
|
|
44
44
|
url, path = self.window.core.filesystem.extract_local_url(url)
|
|
45
|
-
return "
|
|
46
|
-
format(prefix=trans('chat.prefix.img'),
|
|
47
|
-
path=path,
|
|
48
|
-
num=num_str)
|
|
45
|
+
return f"\n{trans('chat.prefix.img')}{num_str}: {path}\n"
|
|
49
46
|
|
|
50
47
|
def get_url_html(
|
|
51
48
|
self,
|
|
@@ -63,11 +60,8 @@ class Body:
|
|
|
63
60
|
"""
|
|
64
61
|
num_str = ""
|
|
65
62
|
if num is not None and num_all is not None and num_all > 1:
|
|
66
|
-
num_str = " [{}]"
|
|
67
|
-
return "
|
|
68
|
-
format(prefix=trans('chat.prefix.url'),
|
|
69
|
-
url=url,
|
|
70
|
-
num=num_str)
|
|
63
|
+
num_str = f" [{num}]"
|
|
64
|
+
return f"{trans('chat.prefix.url')}{num_str}: {url}"
|
|
71
65
|
|
|
72
66
|
def get_docs_html(self, docs: List[Dict]) -> str:
|
|
73
67
|
"""
|
|
@@ -93,8 +87,8 @@ class Body:
|
|
|
93
87
|
"""
|
|
94
88
|
doc_parts = []
|
|
95
89
|
for key in doc_json:
|
|
96
|
-
doc_parts.append("{}: {
|
|
97
|
-
html_sources += "\n[{}] {}: {
|
|
90
|
+
doc_parts.append(f"{key}: {doc_json[key]}")
|
|
91
|
+
html_sources += f"\n[{num}] {uuid}: {', '.join(doc_parts)}"
|
|
98
92
|
num += 1
|
|
99
93
|
if num >= max:
|
|
100
94
|
break
|
|
@@ -102,7 +96,7 @@ class Body:
|
|
|
102
96
|
pass
|
|
103
97
|
|
|
104
98
|
if html_sources != "":
|
|
105
|
-
html += "\n----------\n{
|
|
99
|
+
html += f"\n----------\n{trans('chat.prefix.doc')}:\n"
|
|
106
100
|
html += html_sources
|
|
107
101
|
return html
|
|
108
102
|
|
|
@@ -122,9 +116,6 @@ class Body:
|
|
|
122
116
|
"""
|
|
123
117
|
num_str = ""
|
|
124
118
|
if num is not None and num_all is not None and num_all > 1:
|
|
125
|
-
num_str = " [{}]"
|
|
119
|
+
num_str = f" [{num}]"
|
|
126
120
|
url, path = self.window.core.filesystem.extract_local_url(url)
|
|
127
|
-
return "
|
|
128
|
-
format(prefix=trans('chat.prefix.file'),
|
|
129
|
-
path=path,
|
|
130
|
-
num=num_str)
|
|
121
|
+
return f"\n{trans('chat.prefix.file')}{num_str}: {path}\n"
|
|
@@ -6,7 +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.08.
|
|
9
|
+
# Updated Date: 2025.08.21 00:00:00 #
|
|
10
|
+
# ================================================== #
|
|
10
11
|
|
|
11
12
|
from datetime import datetime
|
|
12
13
|
from typing import Optional, List
|
|
@@ -54,7 +55,7 @@ class Renderer(BaseRenderer):
|
|
|
54
55
|
def get_pid(self, meta: CtxMeta):
|
|
55
56
|
"""
|
|
56
57
|
Get PID for context meta
|
|
57
|
-
|
|
58
|
+
|
|
58
59
|
:param meta: context PID
|
|
59
60
|
"""
|
|
60
61
|
return self.window.core.ctx.output.get_pid(meta)
|
|
@@ -62,7 +63,7 @@ class Renderer(BaseRenderer):
|
|
|
62
63
|
def get_or_create_pid(self, meta: CtxMeta):
|
|
63
64
|
"""
|
|
64
65
|
Get PID for context meta and create PID data (if not exists)
|
|
65
|
-
|
|
66
|
+
|
|
66
67
|
:param meta: context PID
|
|
67
68
|
"""
|
|
68
69
|
if meta is not None:
|
|
@@ -74,7 +75,7 @@ class Renderer(BaseRenderer):
|
|
|
74
75
|
def pid_create(self, pid, meta: CtxMeta):
|
|
75
76
|
"""
|
|
76
77
|
Create PID data
|
|
77
|
-
|
|
78
|
+
|
|
78
79
|
:param pid: PID
|
|
79
80
|
:param meta: context meta
|
|
80
81
|
"""
|
|
@@ -98,7 +99,7 @@ class Renderer(BaseRenderer):
|
|
|
98
99
|
):
|
|
99
100
|
"""
|
|
100
101
|
Render begin
|
|
101
|
-
|
|
102
|
+
|
|
102
103
|
:param meta: context meta
|
|
103
104
|
:param ctx: context item
|
|
104
105
|
:param stream: True if it is a stream
|
|
@@ -113,7 +114,7 @@ class Renderer(BaseRenderer):
|
|
|
113
114
|
):
|
|
114
115
|
"""
|
|
115
116
|
Render end
|
|
116
|
-
|
|
117
|
+
|
|
117
118
|
:param meta: context meta
|
|
118
119
|
:param ctx: context item
|
|
119
120
|
:param stream: True if it is a stream
|
|
@@ -128,7 +129,7 @@ class Renderer(BaseRenderer):
|
|
|
128
129
|
):
|
|
129
130
|
"""
|
|
130
131
|
Render end extra
|
|
131
|
-
|
|
132
|
+
|
|
132
133
|
:param meta: context meta
|
|
133
134
|
:param ctx: context item
|
|
134
135
|
:param stream: True if it is a stream
|
|
@@ -203,12 +204,12 @@ class Renderer(BaseRenderer):
|
|
|
203
204
|
if self.is_timestamp_enabled() and item.input_timestamp is not None:
|
|
204
205
|
name = ""
|
|
205
206
|
if item.input_name is not None and item.input_name != "":
|
|
206
|
-
name = item.input_name
|
|
207
|
+
name = f"{item.input_name} "
|
|
207
208
|
ts = datetime.fromtimestamp(item.input_timestamp)
|
|
208
209
|
hour = ts.strftime("%H:%M:%S")
|
|
209
|
-
text =
|
|
210
|
+
text = f"{name}{hour} > {item.input}"
|
|
210
211
|
else:
|
|
211
|
-
text = "> {
|
|
212
|
+
text = f"> {item.input}"
|
|
212
213
|
self.append_raw(meta, item, text.strip())
|
|
213
214
|
self.to_end(meta)
|
|
214
215
|
|
|
@@ -228,12 +229,12 @@ class Renderer(BaseRenderer):
|
|
|
228
229
|
if self.is_timestamp_enabled() and item.output_timestamp is not None:
|
|
229
230
|
name = ""
|
|
230
231
|
if item.output_name is not None and item.output_name != "":
|
|
231
|
-
name = item.output_name
|
|
232
|
+
name = f"{item.output_name} "
|
|
232
233
|
ts = datetime.fromtimestamp(item.output_timestamp)
|
|
233
234
|
hour = ts.strftime("%H:%M:%S")
|
|
234
|
-
text =
|
|
235
|
+
text = f"{name}{hour} {item.output}"
|
|
235
236
|
else:
|
|
236
|
-
text = "{
|
|
237
|
+
text = f"{item.output}"
|
|
237
238
|
self.append_raw(meta, item, text.strip())
|
|
238
239
|
self.to_end(meta)
|
|
239
240
|
|
|
@@ -298,7 +299,8 @@ class Renderer(BaseRenderer):
|
|
|
298
299
|
except Exception as e:
|
|
299
300
|
pass
|
|
300
301
|
if urls_str:
|
|
301
|
-
|
|
302
|
+
urls_joined = "\n".join(urls_str)
|
|
303
|
+
self.append_raw(meta, item, f"\n{urls_joined}")
|
|
302
304
|
|
|
303
305
|
if self.window.core.config.get('ctx.sources'):
|
|
304
306
|
if item.doc_ids is not None and len(item.doc_ids) > 0:
|
|
@@ -341,12 +343,12 @@ class Renderer(BaseRenderer):
|
|
|
341
343
|
if self.is_timestamp_enabled() and item.output_timestamp is not None:
|
|
342
344
|
name = ""
|
|
343
345
|
if item.output_name is not None and item.output_name != "":
|
|
344
|
-
name = item.output_name
|
|
346
|
+
name = f"{item.output_name} "
|
|
345
347
|
ts = datetime.fromtimestamp(item.output_timestamp)
|
|
346
348
|
hour = ts.strftime("%H:%M:%S")
|
|
347
|
-
text_chunk = "{}{}: "
|
|
349
|
+
text_chunk = f"{name}{hour}: {text_chunk}"
|
|
348
350
|
|
|
349
|
-
text_chunk = "\n"
|
|
351
|
+
text_chunk = f"\n{text_chunk}"
|
|
350
352
|
self.append_block(meta)
|
|
351
353
|
self.append_chunk_start(meta, item)
|
|
352
354
|
|
|
@@ -378,7 +380,7 @@ class Renderer(BaseRenderer):
|
|
|
378
380
|
):
|
|
379
381
|
"""
|
|
380
382
|
Append and format raw text to output as plain text.
|
|
381
|
-
|
|
383
|
+
|
|
382
384
|
:param meta: context meta
|
|
383
385
|
:param ctx: context item
|
|
384
386
|
:param text: text to append
|
|
@@ -387,7 +389,7 @@ class Renderer(BaseRenderer):
|
|
|
387
389
|
prev_text = node.toPlainText()
|
|
388
390
|
if prev_text != "":
|
|
389
391
|
prev_text += "\n\n"
|
|
390
|
-
new_text = prev_text
|
|
392
|
+
new_text = f"{prev_text}{text.strip()}"
|
|
391
393
|
node.setPlainText(new_text)
|
|
392
394
|
cur = node.textCursor() # Move cursor to end of text
|
|
393
395
|
cur.movePosition(QTextCursor.End)
|
|
@@ -395,7 +397,7 @@ class Renderer(BaseRenderer):
|
|
|
395
397
|
def append_chunk_start(self, meta: CtxMeta, ctx: CtxItem):
|
|
396
398
|
"""
|
|
397
399
|
Append start of chunk to output
|
|
398
|
-
|
|
400
|
+
|
|
399
401
|
:param meta: context meta
|
|
400
402
|
:param ctx: context item
|
|
401
403
|
"""
|
|
@@ -411,7 +413,7 @@ class Renderer(BaseRenderer):
|
|
|
411
413
|
):
|
|
412
414
|
"""
|
|
413
415
|
Append context item to output
|
|
414
|
-
|
|
416
|
+
|
|
415
417
|
:param meta: context meta
|
|
416
418
|
:param item: context item
|
|
417
419
|
"""
|
|
@@ -437,7 +439,7 @@ class Renderer(BaseRenderer):
|
|
|
437
439
|
node = self.get_output_node(meta)
|
|
438
440
|
cur = node.textCursor() # Move cursor to end of text
|
|
439
441
|
cur.movePosition(QTextCursor.End)
|
|
440
|
-
s = str(text)
|
|
442
|
+
s = f"{str(text)}{end}"
|
|
441
443
|
while s:
|
|
442
444
|
head, sep, s = s.partition("\n") # Split line at LF
|
|
443
445
|
cur.insertText(head)
|
|
@@ -452,7 +454,7 @@ class Renderer(BaseRenderer):
|
|
|
452
454
|
) -> str:
|
|
453
455
|
"""
|
|
454
456
|
Append timestamp to text
|
|
455
|
-
|
|
457
|
+
|
|
456
458
|
:param item: context item
|
|
457
459
|
:param text: input text
|
|
458
460
|
:return: Text with timestamp (if enabled)
|
|
@@ -462,7 +464,7 @@ class Renderer(BaseRenderer):
|
|
|
462
464
|
and item.input_timestamp is not None:
|
|
463
465
|
ts = datetime.fromtimestamp(item.input_timestamp)
|
|
464
466
|
hour = ts.strftime("%H:%M:%S")
|
|
465
|
-
text =
|
|
467
|
+
text = f"{hour}: {text}"
|
|
466
468
|
return text
|
|
467
469
|
|
|
468
470
|
def reset(self, meta: Optional[CtxMeta] = None):
|
|
@@ -518,7 +520,7 @@ class Renderer(BaseRenderer):
|
|
|
518
520
|
) -> ChatOutput:
|
|
519
521
|
"""
|
|
520
522
|
Get output node for current context.
|
|
521
|
-
|
|
523
|
+
|
|
522
524
|
:param meta: context meta
|
|
523
525
|
:return: output node
|
|
524
526
|
"""
|
|
@@ -547,8 +549,6 @@ class Renderer(BaseRenderer):
|
|
|
547
549
|
for node in self.get_all_nodes():
|
|
548
550
|
try:
|
|
549
551
|
node.clear()
|
|
550
|
-
node.document().setDefaultStyleSheet("")
|
|
551
|
-
node.setStyleSheet("")
|
|
552
552
|
node.document().setMarkdown("")
|
|
553
553
|
node.document().setHtml("")
|
|
554
554
|
node.setPlainText("")
|
|
@@ -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.17",
|
|
4
|
+
"app.version": "2.6.17",
|
|
5
|
+
"updated_at": "2025-08-21T00: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": 16,
|
|
183
|
+
"font_size.input": 16,
|
|
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.17",
|
|
4
|
+
"app.version": "2.6.17",
|
|
5
|
+
"updated_at": "2025-08-21T23:07:35"
|
|
6
6
|
},
|
|
7
7
|
"items": {
|
|
8
8
|
"SpeakLeash/bielik-11b-v2.3-instruct:Q4_K_M": {
|
|
@@ -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)
|
|
@@ -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。
|