pygpt-net 2.4.36.post1__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.
@@ -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.
@@ -626,7 +626,7 @@ menu.tray.screenshot = Demander avec une capture d'écran...
626
626
  menu.video = Vidéo
627
627
  menu.video.capture = Entrée : caméra
628
628
  menu.video.capture.auto = Capture automatique
629
- mode.agent = Agent (Legacy)
629
+ mode.agent = Agent (Autonome)
630
630
  mode.agent_llama = Agent (LlamaIndex)
631
631
  mode.agent_llama.tooltip = Agents avancés (LlamaIndex)
632
632
  mode.agent.tooltip = Agents simples (legacy)
@@ -683,7 +683,7 @@ preset.action.disable = Désactiver
683
683
  preset.action.duplicate = Dupliquer
684
684
  preset.action.edit = Modifier
685
685
  preset.action.enable = Activer
686
- preset.agent = Agent (Legacy)
686
+ preset.agent = Agent (Autonome)
687
687
  preset.agent_llama = Agent (LlamaIndex)
688
688
  preset.agent_provider = Fournisseur d'agent
689
689
  preset.agent_provider.desc = Sélectionnez le type d'agent pour le préréglage actuel
@@ -760,6 +760,10 @@ settings.cmd.field.instruction = Instruction pour le modèle
760
760
  settings.cmd.field.params = Paramètres JSON (arguments de l'outil)
761
761
  settings.cmd.field.tooltip = Activer l'outil `{cmd}`
762
762
  settings.context_threshold = Seuil de contexte
763
+ settings.ctx.attachment.rag.history = Utiliser l'historique dans la requête RAG
764
+ settings.ctx.attachment.rag.history.desc = Lorsqu'il est activé, le contenu de toute la conversation sera utilisé lors de la préparation d'une requête si le mode est RAG ou Résumé.
765
+ settings.ctx.attachment.rag.history.max_items = Limite RAG
766
+ settings.ctx.attachment.rag.history.max_items.desc = Seulement si l'option 'Utiliser l'historique dans la requête RAG' est activée. Spécifiez la limite du nombre d'entrées récentes de la conversation qui seront utilisées lors de la génération d'une requête pour RAG. 0 = aucune limite.
763
767
  settings.ctx.audio = Toujours afficher l'icône audio
764
768
  settings.ctx.auto_summary = Résumé automatique du contexte
765
769
  settings.ctx.auto_summary.model = Modèle utilisé pour le résumé automatique
@@ -916,7 +920,7 @@ text.context_menu.find = Trouver...
916
920
  theme.dark = Sombre
917
921
  theme.light = Lumière
918
922
  tip.input.attachments = Ici, vous pouvez ajouter des pièces jointes au message que vous envoyez. Vous pouvez envoyer des fichiers texte, des fichiers de code, des PDF, des documents, des feuilles de calcul, et d'autres - ils seront utilisés comme contexte supplémentaire dans la conversation. Vous pouvez également envoyer des images ou des photos capturées par une caméra pour analyse.
919
- tip.input.attachments.ctx = Ci-dessous se trouvent les pièces jointes téléchargées et indexées que vous pouvez utiliser comme contexte supplémentaire. Le contexte supplémentaire est disponible pour toute la discussion ci-dessus. Options : Contexte complet - inclut tout le contenu supplémentaire (brut) dans l'invite du système, Requête uniquement - interroge uniquement le contenu indexé, Résumé - inclut un résumé du contenu ajouté dans l'invite, Désactivé - désactive le contexte supplémentaire.
923
+ tip.input.attachments.ctx = Vous trouverez ci-dessous les pièces jointes téléchargées et indexées disponibles à utiliser comme contexte supplémentaire pour toute la discussion ci-dessus. Options : Contexte complet - attache le contenu entier de la pièce jointe dans le prompt d'entrée, RAG - interroge la pièce jointe indexée pour un contexte supplémentaire, Résumé - inclut un résumé du contenu ajouté dans le prompt, Désactivé - désactive le contexte supplémentaire. **AVERTISSEMENT :** L'utilisation du mode Contexte complet peut consommer beaucoup de jetons (car le contenu brut de la pièce jointe sera attaché au prompt d'entrée)!
920
924
  tip.input.attachments.uploaded = Voici une liste de fichiers téléchargés sur le serveur en mode Assistant. Ces fichiers sont situés sur un serveur distant, pas sur votre ordinateur local, donc le modèle peut les utiliser et les analyser à l'aide des outils disponibles à l'extérieur sur le serveur distant.
921
925
  tip.output.tab.calendar = En utilisant le calendrier, vous pouvez revenir à des conversations sélectionnées d'un jour spécifique. Cliquez sur un jour dans le calendrier pour limiter l'affichage de l'historique de chat à ce jour. Vous pouvez également créer des notes de jour et leur attribuer des étiquettes colorées.
922
926
  tip.output.tab.draw = Vous pouvez utiliser l'outil de dessin pour esquisser rapidement ou capturer une image de la caméra, puis envoyer de telles images à l'IA en mode Vision pour analyse. Vous pouvez capturer une image avec la caméra ici ou ouvrir une image du disque. Lors de l'utilisation d'une image, elle sera incluse dans le message envoyé en tant que pièce jointe.
@@ -626,7 +626,7 @@ menu.tray.screenshot = Chiedi con uno screenshot...
626
626
  menu.video = Video
627
627
  menu.video.capture = Ingresso: fotocamera
628
628
  menu.video.capture.auto = Cattura automatica
629
- mode.agent = Agente (legacy)
629
+ mode.agent = Agente (Autonomo)
630
630
  mode.agent_llama = Agente (LlamaIndex)
631
631
  mode.agent_llama.tooltip = Agenti avanzati (LlamaIndex)
632
632
  mode.agent.tooltip = Agenti semplici (legacy)
@@ -684,7 +684,7 @@ preset.action.disable = Disabilitare
684
684
  preset.action.duplicate = Duplica
685
685
  preset.action.edit = Modifica
686
686
  preset.action.enable = Abilitare
687
- preset.agent = Agente (legacy)
687
+ preset.agent = Agente (Autonomo)
688
688
  preset.agent_llama = Agente (LlamaIndex)
689
689
  preset.agent_provider = Fornitore di agenti
690
690
  preset.agent_provider.desc = Seleziona il tipo di agente per il preset corrente
@@ -761,6 +761,10 @@ settings.cmd.field.instruction = Istruzione per il modello
761
761
  settings.cmd.field.params = Parametri JSON (argomenti dello strumento)
762
762
  settings.cmd.field.tooltip = Abilita lo strumento `{cmd}`
763
763
  settings.context_threshold = Soglia del contesto
764
+ settings.ctx.attachment.rag.history = Usa la cronologia nella query RAG
765
+ settings.ctx.attachment.rag.history.desc = Quando abilitato, il contenuto dell'intera conversazione verrà utilizzato durante la preparazione di una query se la modalità è RAG o Sommario.
766
+ settings.ctx.attachment.rag.history.max_items = Limite RAG
767
+ settings.ctx.attachment.rag.history.max_items.desc = Solo se l'opzione 'Usa la cronologia nella query RAG' è abilitata. Specifica il limite di quante voci recenti nella conversazione verranno utilizzate quando si genera una query per RAG. 0 = nessun limite.
764
768
  settings.ctx.audio = Mostra sempre l'icona audio
765
769
  settings.ctx.auto_summary = Riassunto automatico del contesto
766
770
  settings.ctx.auto_summary.model = Modello utilizzato per riassunto automatico
@@ -916,7 +920,7 @@ text.context_menu.find = Trova...
916
920
  theme.dark = Scuro
917
921
  theme.light = Luminoso
918
922
  tip.input.attachments = Qui puoi aggiungere allegati al messaggio che stai inviando. Puoi inviare file di testo, file di codice, PDF, documenti, fogli di calcolo e altri - verranno utilizzati come contesto aggiuntivo nella conversazione. Puoi anche inviare immagini o foto catturate da una fotocamera per l'analisi.
919
- tip.input.attachments.ctx = Di seguito sono riportati gli allegati caricati e indicizzati che puoi utilizzare come contesto aggiuntivo. Il contesto aggiuntivo è disponibile per l'intera discussione sopra. Opzioni: Contesto completo - include tutto il contenuto aggiuntivo (grezzo) nel prompt del sistema, Solo query - interroga solo il contenuto indicizzato, Sommario - include un sommario del contenuto aggiunto nel prompt, Spento - disabilita il contesto aggiuntivo.
923
+ tip.input.attachments.ctx = Di seguito sono disponibili gli allegati caricati e indicizzati da utilizzare come contesto aggiuntivo per l'intera discussione sopra. Opzioni: Contesto completo - allega l'intero contenuto dell'allegato nel prompt di input, RAG - interroga l'allegato indicizzato per un contesto aggiuntivo, Sintesi - include un riassunto del contenuto aggiunto nel prompt, Disattivato - disabilita il contesto aggiuntivo. **ATTENZIONE:** l'uso della modalità Contesto completo può consumare molti token (poiché il contenuto grezzo dell'allegato verrà allegato al prompt di input)!
920
924
  tip.input.attachments.uploaded = Qui è presente un elenco di файлы caricati sul server in modalità Assistant. Questi файлы si trovano su un сервер remoto, non sul tuo computer locale, quindi il modello può utilizzarli e analizzarli utilizzando strumenti disponibili all'esterno sul сервер remoto.
921
925
  tip.output.tab.calendar = Utilizzando il calendario, puoi tornare a conversazioni selezionate di un giorno specifico. Clicca su un giorno nel calendario per limitare la visualizzazione della cronologia della chat a quel giorno. Puoi anche creare note giornaliere e assegnarle etichette colorate.
922
926
  tip.output.tab.draw = Puoi utilizzare lo strumento di disegno per fare rapidi schizzi o catturare un'immagine dalla fotocamera, e poi inviare tali immagini all'IA in modalità Vision per l'analisi. Puoi catturare un'immagine con la fotocamera qui o aprire un'immagine dal disco. Quando utilizzi un'immagine, questa sarà inclusa nel messaggio inviato come allegato.
@@ -115,7 +115,7 @@ attachments.header.name = Nazwa
115
115
  attachments.header.path = Ścieżka
116
116
  attachments.header.size = Rozmiar
117
117
  attachments.header.store = Baza(y) wektorowa
118
- attachments.options.label
118
+ attachments.options.label = Opcje
119
119
  attachments.send_clear = Wyczyść listę po wysłaniu
120
120
  attachments.tab = Załączniki
121
121
  attachments_uploaded.btn.clear = Wyczyść
@@ -626,7 +626,7 @@ menu.tray.screenshot = Zapytaj ze zrzutem ekranu...
626
626
  menu.video = Wideo
627
627
  menu.video.capture = Wejście: kamera
628
628
  menu.video.capture.auto = Automatyczne przechwytywanie
629
- mode.agent = Agent (Legacy)
629
+ mode.agent = Agent (autonomiczny)
630
630
  mode.agent_llama = Agent (LlamaIndex)
631
631
  mode.agent_llama.tooltip = Zaawansowani agenci (LlamaIndex)
632
632
  mode.agent.tooltip = Prości agenci (legacy)
@@ -684,7 +684,7 @@ preset.action.disable = Wyłączyć
684
684
  preset.action.duplicate = Duplikuj
685
685
  preset.action.edit = Edycja
686
686
  preset.action.enable = Włączyć
687
- preset.agent = Agent (Legacy)
687
+ preset.agent = Agent (autonomiczny)
688
688
  preset.agent_llama = Agent (LlamaIndex)
689
689
  preset.agent_provider = Dostawca agenta
690
690
  preset.agent_provider.desc = Wybierz typ agenta dla bieżącego presetu
@@ -761,6 +761,10 @@ settings.cmd.field.instruction = Instrukcja dla modelu
761
761
  settings.cmd.field.params = Parametry JSON (argumenty narzędzia)
762
762
  settings.cmd.field.tooltip = Włącz narzędzie `{cmd}`
763
763
  settings.context_threshold = Zarezerwowany kontekst
764
+ settings.ctx.attachment.rag.history = Użyj historii w zapytaniu RAG
765
+ settings.ctx.attachment.rag.history.desc = Gdy jest włączone, zawartość całej rozmowy będzie używana podczas przygotowywania zapytania, jeśli tryb to RAG lub Podsumowanie.
766
+ settings.ctx.attachment.rag.history.max_items = Limit RAG
767
+ settings.ctx.attachment.rag.history.max_items.desc = Tylko jeśli opcja 'Użyj historii w zapytaniu RAG' jest włączona. Określ limit, ile ostatnich wpisów z rozmowy zostanie użytych podczas generowania zapytania dla RAG. 0 = brak limitu.
764
768
  settings.ctx.audio = Zawsze pokazuj ikonę audio
765
769
  settings.ctx.auto_summary = Kontekst: auto-podsumowanie
766
770
  settings.ctx.auto_summary.model = Model używany do auto-podsumowania
@@ -917,7 +921,7 @@ text.context_menu.find = Znajdź...
917
921
  theme.dark = Ciemny
918
922
  theme.light = Jasny
919
923
  tip.input.attachments = Tutaj możesz dodać załączniki do wysyłanej wiadomości. Możesz wysyłać pliki tekstowe, z kodem, PDF, dokumenty, arkusze i inne - zostaną one użyte jako dodatkowy kontekst w konwersacji. Możesz także wysyłać obrazy lub przechwycone zdjęcia z kamery do analizy.
920
- tip.input.attachments.ctx = Poniżej znajdują się przesłane i zindeksowane załączniki, które możesz wykorzystać jako dodatkowy kontekst. Dodatkowy kontekst jest dostępny dla całej powyższej dyskusji. Opcje: Pełny kontekst - zawiera cały dodatkowy materiał (surowy) w zapytaniu systemowym, Tylko zapytanie - zapytuje tylko zindeksowaną treść, Podsumowanie - zawiera podsumowanie dodanej treści w zapytaniu, Wyłączone - wyłącza dodatkowy kontekst.
924
+ 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 - dołącza 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 (surowa zawartość z załącznika zostanie dołączona do zapytania)!
921
925
  tip.input.attachments.uploaded = Tutaj znajduje się lista plików przesłanych na serwer w trybie Asystenta. Te pliki znajdują się na zdalnym serwerze, a nie na lokalnym komputerze, więc model może używać i analizować je za pomocą narzędzi dostępnych zewnętrznie na zdalnym serwerze.
922
926
  tip.output.tab.calendar = Korzystając z kalendarza, możesz wrócić do wybranych rozmów z określonego dnia. Kliknij na dzień w kalendarzu, aby ograniczyć wyświetlanie historii czatu do tego dnia. Możesz również tworzyć notatki dnia i przypisywać im kolorowe etykiety.
923
927
  tip.output.tab.draw = Możesz użyć narzędzia do rysowania do szybkiego szkicowania lub przechwytywania obrazu z kamery, a następnie wysyłać takie obrazy do AI w trybie Vision do analizy. Możesz tu przechwycić obraz za pomocą kamery lub otworzyć obraz z dysku. Przy użyciu obrazu zostanie on dołączony do wysłanej wiadomości jako załącznik.
@@ -625,7 +625,7 @@ menu.tray.screenshot = Запитати зі скріншотом...
625
625
  menu.video = Відео
626
626
  menu.video.capture = Вхід: камера
627
627
  menu.video.capture.auto = Автоматичне захоплення зображення
628
- mode.agent = Агент (legacy)
628
+ mode.agent = Агент (Автономний)
629
629
  mode.agent_llama = Агент (LlamaIndex)
630
630
  mode.agent_llama.tooltip = Розширені агенти (LlamaIndex)
631
631
  mode.agent.tooltip = Прості агенти (legacy)
@@ -683,7 +683,7 @@ preset.action.disable = Вимкнути
683
683
  preset.action.duplicate = Дублювати
684
684
  preset.action.edit = Редагувати
685
685
  preset.action.enable = Увімкнути
686
- preset.agent = Агент (legacy)
686
+ preset.agent = Агент (Автономний)
687
687
  preset.agent_llama = Агент (LlamaIndex)
688
688
  preset.agent_provider = Постачальник агентів
689
689
  preset.agent_provider.desc = Виберіть тип агента для поточного пресету
@@ -760,6 +760,10 @@ settings.cmd.field.instruction = Інструкція для моделі
760
760
  settings.cmd.field.params = Параметри JSON (аргументи інструменту)
761
761
  settings.cmd.field.tooltip = Увімкнути інструмент `{cmd}`
762
762
  settings.context_threshold = Поріг контексту
763
+ settings.ctx.attachment.rag.history = Використовувати історію в запиті RAG
764
+ settings.ctx.attachment.rag.history.desc = Коли увімкнено, вміст усієї розмови буде використовуватися під час підготовки запиту, якщо режим - RAG або Резюме.
765
+ settings.ctx.attachment.rag.history.max_items = Ліміт RAG
766
+ settings.ctx.attachment.rag.history.max_items.desc = Тільки якщо опція 'Використовувати історію в запиті RAG' увімкнена. Укажіть ліміт того, скільки недавніх записів розмови буде використано під час створення запиту для RAG. 0 = без обмежень.
763
767
  settings.ctx.audio = Завжди показувати значок аудіо
764
768
  settings.ctx.auto_summary = Автоматичне стиснення контексту
765
769
  settings.ctx.auto_summary.model = Модель, що використовується для автоматичного стиснення
@@ -916,7 +920,7 @@ text.context_menu.find = Знайти...
916
920
  theme.dark = Темна
917
921
  theme.light = Світла
918
922
  tip.input.attachments = Тут ви можете додати вкладення до повідомлення, яке ви надсилаєте. Ви можете надіслати текстові файли, файли з кодом, PDF, документи, електронні таблиці та інші - вони будуть використані як додатковий контекст у розмові. Ви також можете надіслати зображення або знімки, зроблені за допомогою камери, для аналізу.
919
- tip.input.attachments.ctx = Нижче наведено завантажені та проіндексовані вкладення, які ви можете використовувати як додатковий контекст. Додатковий контекст доступний для всієї вищезгаданої дискусії. Варіанти: Повний контекст - включає весь додатковий вміст (сирий) у системному запиті, Лише запит - запитує лише проіндексований вміст, Резюме - включає резюме доданого вмісту в запиті, Вимкнено - вимкнути додатковий контекст.
923
+ tip.input.attachments.ctx = Нижче наведено завантажені та індексовані вкладення, доступні для використання як додатковий контекст для всієї обговорюваної теми вище. Варіанти: Повний контекст - додає весь вміст з вкладення в запит, RAG - здійснює запит до індексованого вкладення для додаткового контексту, Резюме - включає резюме доданого вмісту в запит, Вимкнено - відключає додатковий контекст. **ПОПЕРЕДЖЕННЯ:** використання режиму повного контексту може використовувати багато токенів (оскільки сирий вміст із вкладення буде додано в запит)!
920
924
  tip.input.attachments.uploaded = Тут є список файлів, завантажених на сервер у режимі Асистента. Ці файли розташовані на віддаленому сервері, а не на вашому локальному комп'ютері, тому модель може використовувати їх та аналізувати за допомогою інструментів, доступних ззовні на віддаленому сервері.
921
925
  tip.output.tab.calendar = Використовуючи календар, ви можете повертатись до обраних розмов з певного дня. Натисніть на день у календарі, щоб обмежити відображення історії чату до цього дня. Ви також можете створювати денні нотатки та присвоювати їм кольорові мітки.
922
926
  tip.output.tab.draw = Ви можете використовувати інструмент малювання для швидкого скетчингу або захоплення зображення з камери, а потім надсилати такі зображення ШІ у режимі Vision для аналізу. Ви можете захопити зображення за допомогою камери тут або відкрити зображення з диску. При використанні зображення, воно буде включене в наді слане повідомлення як вкладення.
@@ -701,10 +701,10 @@ menu.tray.screenshot = 使用截圖提問...
701
701
  menu.video = 視頻
702
702
  menu.video.capture = 輸入:相機
703
703
  menu.video.capture.auto = 自動捕捉
704
- mode.agent = 代理(legacy)
704
+ mode.agent = 代理(自主)
705
705
  mode.agent_llama = 代理(LlamaIndex)
706
706
  mode.agent_llama.tooltip = 高级代理(LlamaIndex)
707
- mode.agent.tooltip = 简单代理(legacy)
707
+ mode.agent.tooltip = 简单代理(自主)
708
708
  mode.assistant = 助手
709
709
  mode.assistant.tooltip = 使用助手API進行聊天
710
710
  mode.audio = 语音聊天
@@ -784,7 +784,7 @@ preset.action.disable = 禁用
784
784
  preset.action.duplicate= 複製
785
785
  preset.action.edit= 編輯
786
786
  preset.action.enable = 启用
787
- preset.agent = 代理(legacy)
787
+ preset.agent = 代理(自主)
788
788
  preset.agent_llama = 代理(LlamaIndex)
789
789
  preset.agent_provider = 代理提供者
790
790
  preset.agent_provider.desc = 为当前预设选择代理类型
@@ -862,6 +862,10 @@ settings.cmd.field.instruction = 模型指令
862
862
  settings.cmd.field.params = JSON 参数(工具参数)
863
863
  settings.cmd.field.tooltip = 启用 `{cmd}` 工具
864
864
  settings.context_threshold = 上下文閾值
865
+ settings.ctx.attachment.rag.history = 在RAG查询中使用历史记录
866
+ settings.ctx.attachment.rag.history.desc = 启用时,如果模式为RAG或摘要,整个对话的内容将在准备查询时使用。
867
+ settings.ctx.attachment.rag.history.max_items = RAG限制
868
+ settings.ctx.attachment.rag.history.max_items.desc = 仅在选中“在RAG查询中使用历史记录”选项时。指定在为RAG生成查询时将使用的最近会话条目的限制。0 = 无限制。
865
869
  settings.ctx.audio = 总是显示音频图标
866
870
  settings.ctx.auto_summary = 上下文自動摘要
867
871
  settings.ctx.auto_summary.model = 用於自動摘要的模型
@@ -1032,7 +1036,7 @@ text.context_menu.find = 查找...
1032
1036
  theme.dark = 暗色
1033
1037
  theme.light = 亮色
1034
1038
  tip.input.attachments = 在这里,您可以向正在发送的消息添加附件。 您可以发送文本文件、代码文件、PDF、文档、电子表格和其他文件 - 它们将用作对话中的附加上下文。 您还可以发送图像或从相机捕获的照片进行分析。
1035
- tip.input.attachments.ctx = 以下是已上传和索引的附件,您可以将其用作附加上下文。附加上下文适用于整个讨论。选项:完整上下文 - 在系统提示中包含所有附加内容(原始),仅查询 - 仅查询索引内容,摘要 - 在提示中包含添加内容的摘要,关闭 - 禁用附加上下文。
1039
+ tip.input.attachments.ctx = 以下是上传和索引的附件,可用作上述整个讨论的附加上下文。选项:全文本上下文 - 将整个附件的内容附加到输入提示中,RAG - 查询索引的附件以获取额外的上下文,总结 - 在提示中包含添加内容的摘要,关闭 - 禁用附加上下文。**警告:** 使用全文本上下文模式可能会消耗大量的代币(因为附件的原始内容将附加到输入提示中)!
1036
1040
  tip.input.attachments.uploaded = 這是已上傳到服務器的文件列表,在助手模式下。這些文件位於遠程服務器上,而不是您的本地計算機上,因此模型可以使用並分析外部遠程服務器上可用的工具。
1037
1041
  tip.output.tab.calendar = 使用日曆,您可以導航回特定日期的選定對話。點擊日曆中的一天以限制聊天歷史顯示到該天。您還可以創建日記並為它們分配彩色標籤。
1038
1042
  tip.output.tab.draw = 您可以使用繪圖工具進行快速素描或從相機捕獲圖像,然後將這些圖像發送到AI在視覺模式下進行分析。您可以在這裡使用相機捕獲圖像或從磁盤打開圖像。使用圖像時,它將作為附件包含在發送的消息中。
@@ -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.21 20:00:00 #
9
+ # Updated Date: 2024.11.29 23:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import json
@@ -71,7 +71,7 @@ class Plugin(BasePlugin):
71
71
  if "mode" in data:
72
72
  self.mode = data['mode']
73
73
 
74
- elif name == Event.POST_PROMPT_ASYNC:
74
+ elif name == Event.POST_PROMPT_END:
75
75
  if self.mode in self.ignored_modes: # ignore
76
76
  return
77
77
 
@@ -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.20 03:00:00 #
9
+ # Updated Date: 2024.11.29 23:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from datetime import datetime
@@ -50,7 +50,7 @@ class Plugin(BasePlugin):
50
50
  data = event.data
51
51
  ctx = event.ctx
52
52
 
53
- if name == Event.SYSTEM_PROMPT:
53
+ if name == Event.POST_PROMPT_END:
54
54
  silent = False
55
55
  if 'silent' in data and data['silent']:
56
56
  silent = True
@@ -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 00:00:00 #
9
+ # Updated Date: 2024.11.29 23:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import copy
@@ -1723,6 +1723,17 @@ class Patch:
1723
1723
  data["ctx.edit_icons"] = True
1724
1724
  updated = True
1725
1725
 
1726
+ # < 2.4.37
1727
+ if old < parse_version("2.4.37"):
1728
+ print("Migrating config from < 2.4.37...")
1729
+ if 'ctx.attachment.rag.history' not in data:
1730
+ data["ctx.attachment.rag.history"] = self.window.core.config.get_base(
1731
+ 'ctx.attachment.rag.history')
1732
+ if 'ctx.attachment.rag.history.max_items' not in data:
1733
+ data["ctx.attachment.rag.history.max_items"] = self.window.core.config.get_base(
1734
+ 'ctx.attachment.rag.history.max_items')
1735
+ updated = True
1736
+
1726
1737
  # update file
1727
1738
  migrated = False
1728
1739
  if updated: