pygpt-net 2.4.36__py3-none-any.whl → 2.4.37__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.
@@ -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: 2024.11.26 04:00:00 #
9
+ # Updated Date: 2024.11.29 23:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import copy
@@ -40,7 +40,7 @@ class Context:
40
40
  Summarize the text below by extracting the most important information,
41
41
  especially those that may help answer the question:
42
42
 
43
- `{query}`.
43
+ `{query}`
44
44
 
45
45
  If the answer to the question is not in the text to summarize,
46
46
  simply return a summary of the entire content.
@@ -59,25 +59,49 @@ class Context:
59
59
 
60
60
  `{content}`
61
61
  """
62
-
63
- def get_all(self, meta: CtxMeta) -> list:
64
- """
65
- Get all attachments for meta
66
-
67
- :param meta: CtxMeta instance
68
- :return: list of attachments
69
- """
70
- return meta.additional_ctx
71
-
72
- def get_dir(self, meta: CtxMeta) -> str:
73
- """
74
- Get directory for meta
75
-
76
- :param meta: CtxMeta instance
77
- :return: directory path
62
+ self.rag_prompt = """
63
+ Prepare a question for the RAG engine (vector database) asking for additional context that can help obtain
64
+ extra information necessary to answer the user's question. The query should be brief and to the point,
65
+ so as to be processed as effectively as possible by the RAG engine. Below is the entire conversation
66
+ of the user with the AI assistant, and at the end the current user's question, for which you need to
67
+ prepare DIRECT query for the RAG engine for additional context, taking into account the content of the entire
68
+ discussion and its context. In your response, return only the DIRECT query for additional context,
69
+ do not return anything else besides it. The response should not contain any phrases other than the query itself:
70
+
71
+ # Good RAG query example:
72
+
73
+ `What is the capital of France?`
74
+
75
+ # Bad RAG query example:
76
+
77
+ `Can you tell me the capital of France?`
78
+
79
+ # Full conversation:
80
+
81
+ `{history}`
82
+
83
+ # User question:
84
+
85
+ `{query}`
86
+ """
87
+
88
+ def get_context(self, mode: str, ctx: CtxItem, history: list) -> str:
89
+ """
90
+ Get context for mode
91
+
92
+ :param mode: Context mode
93
+ :param ctx: CtxItem instance
94
+ :param history: history
95
+ :return: context
78
96
  """
79
- meta_uuid = str(meta.uuid)
80
- return os.path.join(self.window.core.config.get_user_dir("ctx_idx"), meta_uuid)
97
+ content = ""
98
+ if mode == self.window.controller.chat.attachment.MODE_FULL_CONTEXT:
99
+ content = self.get_context_text(ctx, filename=True)
100
+ elif mode == self.window.controller.chat.attachment.MODE_QUERY_CONTEXT:
101
+ content = self.query_context(ctx, history)
102
+ elif mode == self.window.controller.chat.attachment.MODE_QUERY_CONTEXT_SUMMARY:
103
+ content = self.summary_context(ctx, history)
104
+ return content
81
105
 
82
106
  def get_context_text(self, ctx: CtxItem, filename: bool = False) -> str:
83
107
  """
@@ -126,15 +150,17 @@ class Context:
126
150
  self.last_used_context = context
127
151
  return context
128
152
 
129
- def query_context(self, meta: CtxMeta, query: str) -> str:
153
+ def query_context(self, ctx: CtxItem, history: list) -> str:
130
154
  """
131
155
  Query the index for context
132
156
 
133
- :param meta : CtxMeta instance
134
- :param query: query string
157
+ :param ctx: CtxItem instance
158
+ :param history: history
135
159
  :return: query result
136
160
  """
161
+ meta = ctx.meta
137
162
  meta_path = self.get_dir(meta)
163
+ query = str(ctx.input)
138
164
  if not os.path.exists(meta_path) or not os.path.isdir(meta_path):
139
165
  return ""
140
166
  idx_path = os.path.join(self.get_dir(meta), self.dir_index)
@@ -162,8 +188,21 @@ class Context:
162
188
  self.window.core.ctx.replace(meta)
163
189
  self.window.core.ctx.save(meta.id)
164
190
 
191
+ history_data = self.prepare_context_history(history)
165
192
  model, model_item = self.get_selected_model("query")
166
- result = self.window.core.idx.chat.query_attachment(query, idx_path, model_item)
193
+
194
+ verbose = False
195
+ if self.is_verbose():
196
+ verbose = True
197
+ print("Attachments: using query model: {}".format(model))
198
+
199
+ result = self.window.core.idx.chat.query_attachment(
200
+ query=query,
201
+ path=idx_path,
202
+ model=model_item,
203
+ history=history_data,
204
+ verbose=verbose,
205
+ )
167
206
  self.last_used_context = result
168
207
 
169
208
  if self.is_verbose():
@@ -171,28 +210,12 @@ class Context:
171
210
 
172
211
  return result
173
212
 
174
- def get_selected_model(self, mode: str = "summary"):
175
- """
176
- Get selected model for attachments
177
-
178
- :return: model name, model item
179
- """
180
- model_item = None
181
- model = None
182
- if mode == "summary":
183
- model = self.window.core.config.get("ctx.attachment.summary.model", "gpt-4o-mini")
184
- elif mode == "query":
185
- model = self.window.core.config.get("ctx.attachment.query.model", "gpt-4o-mini")
186
- if model:
187
- model_item = self.window.core.models.get(model)
188
- return model, model_item
189
-
190
- def summary_context(self, ctx: CtxItem, query: str) -> str:
213
+ def summary_context(self, ctx: CtxItem, history: list) -> str:
191
214
  """
192
215
  Get summary of the context
193
216
 
194
217
  :param ctx: CtxItem instance
195
- :param query: query string
218
+ :param history: history
196
219
  :return: query result
197
220
  """
198
221
  model, model_item = self.get_selected_model("summary")
@@ -202,6 +225,7 @@ class Context:
202
225
  if self.is_verbose():
203
226
  print("Attachments: using summary model: {}".format(model))
204
227
 
228
+ query = str(ctx.input)
205
229
  content = self.get_context_text(ctx, filename=True)
206
230
  prompt = self.summary_prompt.format(
207
231
  query=str(query).strip(),
@@ -210,12 +234,14 @@ class Context:
210
234
  if self.is_verbose():
211
235
  print("Attachments: summary prompt: {}".format(prompt))
212
236
 
237
+ history_data = self.prepare_context_history(history)
213
238
  ctx = CtxItem()
214
239
  bridge_context = BridgeContext(
215
240
  ctx=ctx,
216
241
  prompt=prompt,
217
242
  stream=False,
218
243
  model=model_item,
244
+ history=history_data,
219
245
  )
220
246
  event = KernelEvent(KernelEvent.CALL, {
221
247
  'context': bridge_context,
@@ -228,6 +254,35 @@ class Context:
228
254
  print("Attachments: summary received: {}".format(response))
229
255
  return response
230
256
 
257
+ def prepare_context_history(self, history: list) -> list:
258
+ """
259
+ Prepare context history
260
+
261
+ :param history: history
262
+ :return: history data
263
+ """
264
+ use_history = self.window.core.config.get("ctx.attachment.rag.history", True)
265
+ history_data = []
266
+ if use_history:
267
+ if self.is_verbose():
268
+ print("Attachments: using history for query prepare...")
269
+
270
+ # use only last X items from history
271
+ num_items = self.window.core.config.get("ctx.attachment.rag.history.max_items", 3)
272
+ history_data = []
273
+ for item in history:
274
+ history_data.append(item)
275
+
276
+ # 0 = unlimited
277
+ if num_items > 0:
278
+ if self.is_verbose():
279
+ print("Attachments: using last {} items from history...".format(num_items))
280
+ if len(history_data) < num_items:
281
+ num_items = len(history_data)
282
+ history_data = history_data[-num_items:]
283
+
284
+ return history_data
285
+
231
286
  def upload(
232
287
  self,
233
288
  meta: CtxMeta,
@@ -396,6 +451,41 @@ class Context:
396
451
  print("Attachments: indexed. Doc IDs: {}".format(doc_ids))
397
452
  return doc_ids
398
453
 
454
+ def get_all(self, meta: CtxMeta) -> list:
455
+ """
456
+ Get all attachments for meta
457
+
458
+ :param meta: CtxMeta instance
459
+ :return: list of attachments
460
+ """
461
+ return meta.additional_ctx
462
+
463
+ def get_dir(self, meta: CtxMeta) -> str:
464
+ """
465
+ Get directory for meta
466
+
467
+ :param meta: CtxMeta instance
468
+ :return: directory path
469
+ """
470
+ meta_uuid = str(meta.uuid)
471
+ return os.path.join(self.window.core.config.get_user_dir("ctx_idx"), meta_uuid)
472
+
473
+ def get_selected_model(self, mode: str = "summary"):
474
+ """
475
+ Get selected model for attachments
476
+
477
+ :return: model name, model item
478
+ """
479
+ model_item = None
480
+ model = None
481
+ if mode == "summary":
482
+ model = self.window.core.config.get("ctx.attachment.summary.model", "gpt-4o-mini")
483
+ elif mode == "query":
484
+ model = self.window.core.config.get("ctx.attachment.query.model", "gpt-4o-mini")
485
+ if model:
486
+ model_item = self.window.core.models.get(model)
487
+ return model, model_item
488
+
399
489
  def duplicate(self, from_meta_id: int, to_meta_id: int) -> bool:
400
490
  """
401
491
  Duplicate attachments from one meta to another
@@ -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: 2024.11.23 21:00:00 #
9
+ # Updated Date: 2024.11.29 23:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from PySide6.QtCore import QObject, Signal, QRunnable, Slot
@@ -50,6 +50,9 @@ class BridgeWorker(QObject, QRunnable):
50
50
  # ADDITIONAL CONTEXT: append additional context from attachments
51
51
  self.handle_additional_context()
52
52
 
53
+ # POST PROMPT END: handle post prompt end event
54
+ self.handle_post_prompt_end()
55
+
53
56
  # Langchain
54
57
  if self.mode == MODE_LANGCHAIN:
55
58
  result = self.window.core.chain.call(
@@ -124,6 +127,17 @@ class BridgeWorker(QObject, QRunnable):
124
127
  self.window.dispatch(event)
125
128
  self.context.system_prompt = event.data['value']
126
129
 
130
+ def handle_post_prompt_end(self):
131
+ """Handle post prompt end event"""
132
+ event = Event(Event.POST_PROMPT_END, {
133
+ 'mode': self.context.mode,
134
+ 'reply': self.context.ctx.reply,
135
+ 'value': self.context.system_prompt,
136
+ })
137
+ event.ctx = self.context.ctx
138
+ self.window.dispatch(event)
139
+ self.context.system_prompt = event.data['value']
140
+
127
141
  def handle_additional_context(self):
128
142
  """Append additional context"""
129
143
  ctx = self.context.ctx
@@ -133,7 +147,7 @@ class BridgeWorker(QObject, QRunnable):
133
147
  return
134
148
  if not self.window.controller.chat.attachment.has_context(ctx.meta):
135
149
  return
136
- ad_context = self.window.controller.chat.attachment.get_context(ctx)
150
+ ad_context = self.window.controller.chat.attachment.get_context(ctx, self.context.history)
137
151
  ad_mode = self.window.controller.chat.attachment.get_mode()
138
152
  if ad_context:
139
153
  self.context.prompt += "\n\n" + ad_context # append to input text
@@ -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: 2024.11.26 19:00:00 #
9
+ # Updated Date: 2024.11.29 23:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import json
@@ -50,6 +50,7 @@ class Event(BaseEvent):
50
50
  PLUGIN_OPTION_GET = "plugin.option.get"
51
51
  POST_PROMPT = "post.prompt"
52
52
  POST_PROMPT_ASYNC = "post.prompt.async"
53
+ POST_PROMPT_END = "post.prompt.end"
53
54
  PRE_PROMPT = "pre.prompt"
54
55
  SYSTEM_PROMPT = "system.prompt"
55
56
  TOOL_OUTPUT_RENDER = "tool.output.render"
@@ -405,7 +405,9 @@ class Chat:
405
405
  self,
406
406
  query: str,
407
407
  path: str,
408
- model: ModelItem = None
408
+ model: ModelItem = None,
409
+ history: list = None,
410
+ verbose: bool = False,
409
411
  ) -> str:
410
412
  """
411
413
  Query attachment
@@ -413,6 +415,8 @@ class Chat:
413
415
  :param query: query
414
416
  :param path: path to index
415
417
  :param model: model
418
+ :param history: chat history
419
+ :param verbose: verbose mode
416
420
  :return: response
417
421
  """
418
422
  if model is None:
@@ -424,39 +428,33 @@ class Chat:
424
428
  retriever = index.as_retriever()
425
429
  nodes = retriever.retrieve(query)
426
430
  response = ""
431
+ score = 0
427
432
  for node in nodes:
428
433
  if node.score > 0.5:
434
+ score = node.score
429
435
  response = node.text
430
436
  break
431
437
  output = ""
432
438
  if response:
433
439
  output = str(response)
440
+ if verbose:
441
+ print("Found using retrieval, {} (score: {})".format(output, score))
434
442
  else:
435
- # 2. try with prepared prompt
436
- prompt = """
437
- # Task
438
- Translate the below user prompt into a suitable, short query for the RAG engine, so it can fetch the context
439
- related to the query from the vector database.
440
-
441
- # Important rules
442
- 1. Edit the user prompt in a way that allows for the best possible result.
443
- 2. In your response, give me only the reworded query, without any additional information from yourself.
444
-
445
- # User prompt:
446
- ```{prompt}```
447
- """.format(prompt=query)
448
- response_prepare = index.as_query_engine(
443
+ if verbose:
444
+ print("Not found using retrieval, trying with query engine...")
445
+ history = self.context.get_messages(
446
+ query,
447
+ "",
448
+ history,
449
+ )
450
+ memory = self.get_memory_buffer(history, service_context.llm)
451
+ response = index.as_chat_engine(
449
452
  llm=service_context.llm,
450
453
  streaming=False,
451
- ).query(prompt)
452
- if response_prepare:
453
- # try the final query with prepared prompt
454
- final_response = index.as_query_engine(
455
- llm=service_context.llm,
456
- streaming=False,
457
- ).query(response_prepare.response)
458
- if final_response:
459
- output = str(final_response.response)
454
+ memory=memory,
455
+ ).chat(query)
456
+ if response:
457
+ output = str(response.response)
460
458
  return output
461
459
 
462
460
  def query_retrieval(
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "__meta__": {
3
- "version": "2.4.36",
4
- "app.version": "2.4.36",
5
- "updated_at": "2024-11-28T00:00:00"
3
+ "version": "2.4.37",
4
+ "app.version": "2.4.37",
5
+ "updated_at": "2024-11-30T00:00:00"
6
6
  },
7
7
  "access.audio.event.speech": false,
8
8
  "access.audio.event.speech.disabled": [],
@@ -65,7 +65,7 @@
65
65
  "assistant": "",
66
66
  "assistant_thread": "",
67
67
  "assistant.store.hide_threads": true,
68
- "attachments_auto_index": false,
68
+ "attachments_auto_index": true,
69
69
  "attachments_send_clear": true,
70
70
  "attachments_capture_clear": true,
71
71
  "audio.transcribe.convert_video": true,
@@ -73,7 +73,9 @@
73
73
  "cmd": false,
74
74
  "ctx": "",
75
75
  "ctx.attachment.img": false,
76
- "ctx.attachment.mode": "full",
76
+ "ctx.attachment.mode": "query",
77
+ "ctx.attachment.rag.history": true,
78
+ "ctx.attachment.rag.history.max_items": 3,
77
79
  "ctx.attachment.summary.model": "gpt-4o-mini",
78
80
  "ctx.attachment.query.model": "gpt-4o-mini",
79
81
  "ctx.attachment.verbose": false,
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "__meta__": {
3
- "version": "2.4.36",
4
- "app.version": "2.4.36",
5
- "updated_at": "2024-11-28T00:00:00"
3
+ "version": "2.4.37",
4
+ "app.version": "2.4.37",
5
+ "updated_at": "2024-11-30T00:00:00"
6
6
  },
7
7
  "items": {
8
8
  "claude-3-5-sonnet-20240620": {
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "__meta__": {
3
- "version": "2.4.36",
4
- "app.version": "2.4.36",
5
- "updated_at": "2024-11-28T00:00:00"
3
+ "version": "2.4.37",
4
+ "app.version": "2.4.37",
5
+ "updated_at": "2024-11-30T00:00:00"
6
6
  },
7
7
  "items": {
8
8
  "chat": {
@@ -372,6 +372,32 @@
372
372
  "step": null,
373
373
  "advanced": false
374
374
  },
375
+ "ctx.attachment.rag.history": {
376
+ "section": "files",
377
+ "type": "bool",
378
+ "slider": false,
379
+ "label": "settings.ctx.attachment.rag.history",
380
+ "description": "settings.ctx.attachment.rag.history.desc",
381
+ "value": true,
382
+ "min": null,
383
+ "max": null,
384
+ "multiplier": null,
385
+ "step": null,
386
+ "advanced": false
387
+ },
388
+ "ctx.attachment.rag.history.max_items": {
389
+ "section": "files",
390
+ "type": "int",
391
+ "slider": true,
392
+ "label": "settings.ctx.attachment.rag.history.max_items",
393
+ "description": "settings.ctx.attachment.rag.history.max_items.desc",
394
+ "value": 5,
395
+ "min": 0,
396
+ "max": 100,
397
+ "multiplier": 1,
398
+ "step": 1,
399
+ "advanced": false
400
+ },
375
401
  "download.dir": {
376
402
  "section": "files",
377
403
  "type": "text",
@@ -626,7 +626,7 @@ menu.tray.screenshot = Fragen mit Screenshot...
626
626
  menu.video = Video
627
627
  menu.video.capture = Eingang: kamera
628
628
  menu.video.capture.auto = Automatische Bildaufnahme
629
- mode.agent = Agent (Legacy)
629
+ mode.agent = Agent (Autonom)
630
630
  mode.agent_llama = Agent (LlamaIndex)
631
631
  mode.agent_llama.tooltip = Erweiterte Agenten (LlamaIndex)
632
632
  mode.agent.tooltip = Einfache Agenten (legacy)
@@ -684,7 +684,7 @@ preset.action.disable = Deaktivieren
684
684
  preset.action.duplicate = Duplizieren
685
685
  preset.action.edit = Bearbeiten
686
686
  preset.action.enable = Aktivieren
687
- preset.agent = Agent (Legacy)
687
+ preset.agent = Agent (Autonom)
688
688
  preset.agent_llama = Agent (LlamaIndex)
689
689
  preset.agent_provider = Agentenanbieter
690
690
  preset.agent_provider.desc = Wählen Sie den Agententyp für das aktuelle Preset
@@ -761,6 +761,10 @@ settings.cmd.field.instruction = Anweisung für das Modell
761
761
  settings.cmd.field.params = JSON-Parameter (Werkzeugargumente)
762
762
  settings.cmd.field.tooltip = Aktivieren Sie das `{cmd}`-Werkzeug
763
763
  settings.context_threshold = Kontextschwelle
764
+ settings.ctx.attachment.rag.history = Nutzung der Historie in RAG-Abfrage
765
+ settings.ctx.attachment.rag.history.desc = Wenn aktiviert, wird der Inhalt des gesamten Gesprächs verwendet, wenn eine Abfrage im Modus RAG oder Zusammenfassung vorbereitet wird.
766
+ settings.ctx.attachment.rag.history.max_items = RAG-Limit
767
+ settings.ctx.attachment.rag.history.max_items.desc = Nur wenn die Option 'Nutzung der Historie in RAG-Abfrage' aktiviert ist. Geben Sie das Limit an, wie viele die neuesten Einträge im Gespräch bei der Generierung einer Abfrage für RAG verwendet werden. 0 = kein Limit.
764
768
  settings.ctx.audio = Audio-Symbol immer anzeigen
765
769
  settings.ctx.auto_summary = Kontext automatisch zusammenfassen
766
770
  settings.ctx.auto_summary.model = Modell für automatische Zusammenfassung verwendet
@@ -916,7 +920,7 @@ text.context_menu.find = Suchen...
916
920
  theme.dark = Dunkel
917
921
  theme.light = Hell
918
922
  tip.input.attachments = Hier können Sie Anhänge zur Nachricht hinzufügen, die Sie senden. Sie können Textdateien, Code-Dateien, PDFs, Dokumente, Tabellenkalkulationen und andere senden - sie werden als zusätzlicher Kontext in der Konversation verwendet. Sie können auch Bilder oder aufgenommene Fotos von einer Kamera zur Analyse senden.
919
- tip.input.attachments.ctx = Unten sind die hochgeladenen und indexierten Anhänge, die Sie als zusätzlichen Kontext verwenden können. Der zusätzliche Kontext steht für die gesamte obige Diskussion zur Verfügung. Optionen: Vollständiger Kontext - enthält den gesamten zusätzlichen Inhalt (roh) im System-Prompt, Nur Abfrage - fragt nur den indexierten Inhalt ab, Zusammenfassung - enthält eine Zusammenfassung des hinzugefügten Inhalts im Prompt, Aus - zusätzlichen Kontext deaktivieren.
923
+ tip.input.attachments.ctx = Poniżej znajdują się załączone i zindeksowane załączniki dostępne do użycia jako dodatkowy kontekst dla całej powyższej dyskusji. Opcje: Pełny kontekst - dołącza całą zawartość z załącznika w zapytaniu, RAG - przeszukuje zindeksowany załącznik w poszukiwaniu dodatkowego kontekstu, Podsumowanie - zawiera podsumowanie dodanej treści w zapytaniu, Wyłączone - wyłącza dodatkowy kontekst. **OSTRZEŻENIE:** użycie trybu Pełny kontekst może zużywać wiele tokenów (ponieważ surowa zawartość z załącznika zostanie dołączona do zapytania)!
920
924
  tip.input.attachments.uploaded = Hier ist eine Liste von Dateien, die im Assistant-Modus auf den Server hochgeladen wurden. Diese Dateien befinden sich auf einem entfernten Server und nicht auf Ihrem lokalen Computer, sodass das Modell sie mit extern auf dem entfernten Server verfügbaren Werkzeugen verwenden und analysieren kann.
921
925
  tip.output.tab.calendar = Mit dem Kalender können Sie zu ausgewählten Gesprächen von einem bestimmten Tag navigieren. Klicken Sie in den Kalender auf einen Tag, um die Anzeige des Chat-Verlaufs auf diesen Tag zu beschränken. Sie können auch Tagesnotizen erstellen und ihnen farbige Etiketten zuweisen.
922
926
  tip.output.tab.draw = Sie können das Zeichenwerkzeug für schnelle Skizzen oder das Erfassen eines Bildes von der Kamera verwenden, und dann solche Bilder im Vision-Modus zur Analyse an die KI senden. Sie können hier ein Bild mit der Kamera erfassen oder ein Bild von der Festplatte öffnen. Wenn Sie ein Bild verwenden, wird es als Anhang in der gesendeten Nachricht enthalten sein.
@@ -115,7 +115,7 @@ attachments.ctx.indexed = Yes
115
115
  attachments.ctx.label = Extra context
116
116
  attachments.ctx.mode.full = Full context
117
117
  attachments.ctx.mode.off = Off (disable)
118
- attachments.ctx.mode.query = Query only
118
+ attachments.ctx.mode.query = RAG
119
119
  attachments.ctx.mode.summary = Summary
120
120
  attachments.delete.confirm = Remove file from list?
121
121
  attachments.header.ctx = Ctx
@@ -757,7 +757,7 @@ menu.tray.screenshot = Ask with screenshot...
757
757
  menu.video = Video
758
758
  menu.video.capture = Input: camera
759
759
  menu.video.capture.auto = Auto capture
760
- mode.agent = Agent (Legacy)
760
+ mode.agent = Agent (Autonomous)
761
761
  mode.agent_llama = Agent (LlamaIndex)
762
762
  mode.agent_llama.tooltip = Advanced agents (LlamaIndex)
763
763
  mode.agent.tooltip = Simple agents (legacy)
@@ -840,15 +840,15 @@ preset.action.disable = Disable
840
840
  preset.action.duplicate = Duplicate
841
841
  preset.action.edit = Edit
842
842
  preset.action.enable = Enable
843
- preset.agent = Agent (Legacy)
843
+ preset.agent = Agent (Autonomous)
844
844
  preset.agent_llama = Agent (LlamaIndex)
845
845
  preset.agent_provider = Agent Provider
846
846
  preset.agent_provider.desc = Select the agent type for the current preset
847
- preset.audio = Chat with Audio
848
847
  preset.ai_name = AI name
849
848
  preset.assistant = Assistant
850
849
  preset.assistant_id = OpenAI Assistant ID
851
850
  preset.assistant_id.desc = * only for the OpenAI Assistant agent type. If not provided, a new Assistant will be created.
851
+ preset.audio = Chat with Audio
852
852
  preset.chat = Chat
853
853
  preset.clear = Clear
854
854
  preset.completion = Completion
@@ -934,10 +934,14 @@ settings.ctx.allow_item_delete = Allow context item deletion
934
934
  settings.ctx.allow_item_delete.desc = Enable display of the delete conversation item link
935
935
  settings.ctx.attachment.img = Allow images as additional context
936
936
  settings.ctx.attachment.img.desc = If enabled, images can be used as additional context
937
+ settings.ctx.attachment.query.model = Model for querying index
938
+ settings.ctx.attachment.query.model.desc = Model to use for preparing query and querying the index when the RAG option is selected.
939
+ settings.ctx.attachment.rag.history = Use history in RAG query
940
+ settings.ctx.attachment.rag.history.desc = When enabled, the content of the entire conversation will be used when preparing a query if mode is RAG or Summary.
941
+ settings.ctx.attachment.rag.history.max_items = RAG limit
942
+ settings.ctx.attachment.rag.history.max_items.desc = Only if the option 'Use history in RAG query' is enabled. Specify the limit of how many recent entries in the conversation will be used when generating a query for RAG. 0 = no limit.
937
943
  settings.ctx.attachment.summary.model = Model for attachment content summary
938
944
  settings.ctx.attachment.summary.model.desc = Model to use when generating a summary for the content of a file when the Summary option is selected.
939
- settings.ctx.attachment.query.model = Model for querying index
940
- settings.ctx.attachment.query.model.desc = Model to use for querying the index when the Query only option is selected.
941
945
  settings.ctx.attachment.verbose = Verbose mode
942
946
  settings.ctx.attachment.verbose.desc = Log attachments usage to the console
943
947
  settings.ctx.audio = Always show audio icon
@@ -1144,13 +1148,13 @@ text.context_menu.copy_to = Copy to...
1144
1148
  text.context_menu.copy_to.calendar = Calendar
1145
1149
  text.context_menu.copy_to.input = Input
1146
1150
  text.context_menu.copy_to.notepad = Notepad
1147
- text.context_menu.copy_to.python.code = Python interpreter (Code/history)
1148
- text.context_menu.copy_to.python.input = Python interpreter (Input)
1151
+ text.context_menu.copy_to.python.code = Python Interpreter (Code/history)
1152
+ text.context_menu.copy_to.python.input = Python Interpreter (Input)
1149
1153
  text.context_menu.find = Find...
1150
1154
  theme.dark = Dark
1151
1155
  theme.light = Light
1152
1156
  tip.input.attachments = Here you can add attachments to the message you are sending. You can send text files, code files, PDFs, documents, spreadsheets, and others - they will be used as additional context in the conversation. You can also send images or captured photos from a camera for analysis.
1153
- tip.input.attachments.ctx = Below are the uploaded and indexed attachments that you can use as additional context. The additional context is available for above entire discussion. Options: Full context - includes the entire additional content (raw) in the system prompt, Query only - only queries the indexed content, Summary - includes a summary of the added content in the prompt, Off - disable additional context.
1157
+ tip.input.attachments.ctx = Below are the uploaded and indexed attachments available to use as additional context for the entire discussion above. Options: Full context - attachs the entire content from the attachment in the input prompt, RAG - queries the indexed attachment for additional context, Summary - attachs a summary of the added content in the prompt, Off - disables additional context. **WARNING:** using Full context mode may consume a lot of tokens (as the raw content from the attachment will be attached to the input prompt)!
1154
1158
  tip.input.attachments.uploaded = Here is a list of files uploaded to the server in Assistant mode. These files are located on a remote server, not on your local computer, so the model can use and analyze them using tools available externally on the remote server.
1155
1159
  tip.output.tab.calendar = Using the calendar, you can navigate back to selected conversations from a specific day. Click on a day in the calendar to limit the display of chat history to that day. You can also create day notes and assign them colorful labels.
1156
1160
  tip.output.tab.draw = You can use the drawing tool for quick sketching or capturing an image from the camera, and then send such images to the AI in Vision mode for analysis. You can capture an image with the camera here or open an image from the disk. When using an image, it will be included in the sent message as an attachment.
@@ -625,7 +625,7 @@ menu.tray.screenshot = Preguntar con captura de pantalla...
625
625
  menu.video = Vídeo
626
626
  menu.video.capture = Entrada: cámara
627
627
  menu.video.capture.auto = Captura automática
628
- mode.agent = Agente (legacy)
628
+ mode.agent = Agente (Autónomo)
629
629
  mode.agent_llama = Agente (LlamaIndex)
630
630
  mode.agent_llama.tooltip = Agentes avanzados (LlamaIndex)
631
631
  mode.agent.tooltip = Agentes simples (legacy)
@@ -683,7 +683,7 @@ preset.action.disable = Deshabilitar
683
683
  preset.action.duplicate = Duplicar
684
684
  preset.action.edit = Editar
685
685
  preset.action.enable = Habilitar
686
- preset.agent = Agente (legacy)
686
+ preset.agent = Agente (Autónomo)
687
687
  preset.agent_llama = Agente (LlamaIndex)
688
688
  preset.agent_provider = Proveedor de agentes
689
689
  preset.agent_provider.desc = Seleccione el tipo de agente para el preset actual
@@ -760,6 +760,10 @@ settings.cmd.field.instruction = Instrucción para el modelo
760
760
  settings.cmd.field.params = Parámetros JSON (argumentos de la herramienta)
761
761
  settings.cmd.field.tooltip = Habilitar la herramienta `{cmd}`
762
762
  settings.context_threshold = Umbral del contexto
763
+ settings.ctx.attachment.rag.history = Usar historial en consulta RAG
764
+ settings.ctx.attachment.rag.history.desc = Cuando está habilitado, el contenido de toda la conversación se utilizará al preparar una consulta si el modo es RAG o Resumen.
765
+ settings.ctx.attachment.rag.history.max_items = Límite RAG
766
+ settings.ctx.attachment.rag.history.max_items.desc = Solo si la opción 'Usar historial en consulta RAG' está habilitada. Especifique el límite de cuántas entradas recientes en la conversación se utilizarán al generar una consulta para RAG. 0 = sin límite.
763
767
  settings.ctx.audio = Siempre mostrar el ícono de audio
764
768
  settings.ctx.auto_summary = Resumen automático del contexto
765
769
  settings.ctx.auto_summary.model = Modelo utilizado para el resumen automático
@@ -916,7 +920,7 @@ text.context_menu.find = Encontrar...
916
920
  theme.dark = Oscuro
917
921
  theme.light = Claro
918
922
  tip.input.attachments = Aquí puedes agregar archivos adjuntos al mensaje que estás enviando. Puedes enviar archivos de texto, archivos de código, PDF, documentos, hojas de cálculo, y otros - se utilizarán como contexto adicional en la conversación. También puedes enviar imágenes o fotos capturadas de una cámara para su análisis.
919
- tip.input.attachments.ctx = A continuación se muestran los archivos adjuntos cargados e indexados que puede usar como contexto adicional. El contexto adicional está disponible para toda la discusión anterior. Opciones: Contexto completo - incluye todo el contenido adicional (en bruto) en el aviso del sistema, Solo consulta - solo consulta el contenido indexado, Resumen - incluye un resumen del contenido agregado en el aviso, Apagado - desactiva el contexto adicional.
923
+ tip.input.attachments.ctx = A continuación se detallan los archivos adjuntos subidos y indexados disponibles para usar como contexto adicional en toda la discusión anterior. Opciones: Contexto completo - adjunta todo el contenido del archivo adjunto en el aviso de entrada, RAG - consulta el archivo adjunto indexado para obtener contexto adicional, Resumen - incluye un resumen del contenido agregado en el aviso, Desactivado - deshabilita el contexto adicional. **ADVERTENCIA:** el uso del modo de Contexto completo puede consumir muchos tokens (ya que el contenido bruto del archivo adjunto se adjuntará al aviso de entrada)!
920
924
  tip.input.attachments.uploaded = Aquí tienes una lista de archivos subidos al servidor en el modo Asistente. Estos archivos están ubicados en un servidor remoto, no en tu computadora local, por lo que el modelo puede usarlos y analizarlos utilizando herramientas disponibles externamente en el servidor remoto.
921
925
  tip.output.tab.calendar = Usando el calendario, puedes navegar de vuelta a conversaciones seleccionadas de un día específico. Haz clic en un día en el calendario para limitar la visualización del historial de chat a ese día. También puedes crear notas diarias y asignarles etiquetas de colores.
922
926
  tip.output.tab.draw = Puedes usar la herramienta de dibujo para hacer bocetos rápidos o capturar una imagen de la cámara, y luego enviar dichas imágenes a la IA en modo Visión para su análisis. Puedes capturar una imagen con la cámara aquí o abrir una imagen desde el disco. Al usar una imagen, se incluirá en el mensaje enviado como un adjunto.